当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Facebook application stopped working all of a sudden ; White page

问题描述:

My Facebook application has stopped working all of a sudden, it just shows a white page. There hasn't been any code change. I tried debugging myself, and it seems like there is an issue with the following line of code.

$user_id = $facebook->require_login();

Can anyone help me? How I can get started?

网友答案:

Ok, as you can see I am having the same problem below... it turns out that the solution is to update the authentication method and get the new SDK. See:

https://developers.facebook.com/blog/post/534/

网友答案:

I don't use require_login() anymore, I believe that you just use something like:

$user = $facebook->getUser();

if($user) {
    try {
    $user_profile = $facebook->api('/me','GET');
    } catch(FacebookApiException $e) {
        //  Do something with this error
    }
}
分享给朋友:
您可能感兴趣的文章:
随机阅读: