Facebook API unknown exception with api call after login

匿名 (未验证) 提交于 2019-12-03 07:36:14

问题:

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

回答1:

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.

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



回答2:

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.



回答3:

Go to Facebook Developer site - Open application setting - Advanced setting and disable these two things. 1) Require AppSecret Proof for Server API calls: 2) Stream post URL security:

Worked for me :)



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!