Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API unknown exception with api call after login

after successful facebook login we get an exception:

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

The code is:

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

Anyone seen similar error? I cant find any info on this error anywhere.

Thanks

like image 428
user2001951 Avatar asked Dec 08 '22 15:12

user2001951


2 Answers

As I posted here, this appsecret_proof thing was added to the latest version of PHP SDK quite recently. So my guess is that your App Setting for appsecret_proof is enabled, but you are not using the latest version of PHP SDK so the appcesret_proof is not generated.
You might want to check your setting at App Dashboard > Setting > Advanced > Security.

enter image description here

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

like image 148
Oklahomer Avatar answered Jan 22 '23 03:01

Oklahomer


I got similar error to you. And I don't know how too. But if you don't really need OAuth login. You can disable it in setting>advance.

like image 27
Eakkapat Pattarathamrong Avatar answered Jan 22 '23 03:01

Eakkapat Pattarathamrong