Unknown Facebook API exception with api call after login

after successful login to facebook we get an exception:

Fatal error: Uncaught GraphMethodException: API calls from the server require the appsecret_proof argument laid out in ... /.../lib/base_facebook.php on line 1238

Code:

$user = $facebook -> getUser(); if(!$user) { //redirect etc. stuff here } else { $me = $facebook -> api("/me"); //we get the exception here } 

Has anyone seen a similar error? I can not find information about this error anywhere.

thanks

+4
source share
3 answers

Since I posted here , this appsecret_proof application has been added to the latest PHP SDK quite recently. Therefore, I assume that your application configuration for appsecret_proof is enabled, but you are not using the latest version of the PHP SDK, so appcesret_proof is not created.
You can check your setting in the application bar> Settings> Advanced> Security.

enter image description here

EDIT: 2013-08-09
Now they have [an official document] [3].

+13
source

I had a similar error. And I don’t know how to do it either. But if you do not need an OAuth login. You can disable it when setting> in advance.

+1
source

Go to the site for Facebook developers - Open the application settings - Advanced settings and disable these two things. 1) Require AppSecret confirmation for server API calls: 2) Email URL security:

Worked for me :)

0
source

Source: https://habr.com/ru/post/1481938/


All Articles