Facebook API未知异常与api通话后登录 [英] Facebook API unknown exception with api call after login
问题描述
在Facebook成功登录后,我们会收到一个例外:
after successful facebook login we get an exception:
致命错误:未捕获GraphMethodException:来自服务器的API调用需要在...中抛出一个appsecret_proof参数/.../lib/base_facebook.php第1238行
代码是:
$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.
谢谢
推荐答案
当我发布这里时,这个appsecret_proof的东西最近被添加到最新版本的PHP SDK。所以我猜测你的appecret_proof的应用程序设置是启用的,但是你没有使用最新版本的PHP SDK,因此不会生成appcesret_proof。
您可能需要在App Dashboard>设置>高级>安全性。
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.
编辑:2013-08-09
现在他们有[官方文件] [3]。
2013-08-09
Now they have [official document][3].
这篇关于Facebook API未知异常与api通话后登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!