[英]php facebook sdk getuser() returns 0
I am using facebook php sdk 3 我正在使用Facebook PHP SDK 3
I am using following code : 我正在使用以下代码:
$facebook = new Facebook(array(
'appId' => MY_APP_ID,
'secret' => MY_APP_SECRET,
'cookie' => true
));
$userId = $facebook->getUser();
if(!empty($userId)) {
echo "This is the user id : " . $facebook->getUser();
}
but it is always returning 0, before two days it was working finely but today suddenly it is returning 0, I am not getting why ? 但是它总是返回0,在前两天运行良好,但是今天突然返回0,我不明白为什么?
您绝对应该更新PHP SDK版本,因为使用旧版本时,当前的API更改可能不会反映出来,从而引起问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.