开发者

$facebook->get_loggedin_user(); is Undefined?

开发者 https://www.devze.com 2023-02-04 15:18 出处:网络
This question was asked before, but it wasn\'t answered properly. Can someone please explain how to fix this problem? Right now I am just including facebook.php file from the PHP SDK. And the followin

This question was asked before, but it wasn't answered properly. Can someone please explain how to fix this problem? Right now I am just including facebook.php file from the PHP SDK. And the following code is giving me the error:

$facebook->get_loggedin_user();

Fatal error: Call to undefined method Facebook::get_loggedin_user() 

Any idea what to do?


So I was just informed that the old API is not going to work anymore. If anyo开发者_开发百科ne has a link to a good tutorial to use the new (Graph?) API, please share. Thanks in advance! :)


I think you're using documentation from the old api with the new SDK, which does not have that method and follows a completely different flow.

Check usage here: https://github.com/facebook/php-sdk/

Either way if you want serious help you should provide more info (SDK version, contextual code).

0

精彩评论

暂无评论...
验证码 换一张
取 消