$me = $facebook->api('/me'); returns empty string

后端 未结 2 1261
小蘑菇
小蘑菇 2021-01-28 14:47

This piece of code used to work as expected, but now it seems i can\'t retrieve the user name the same way:

 $uid = $facebook->getUser(); // returns the faceb         


        
2条回答
  •  天涯浪人
    2021-01-28 15:29

    So how to retrieve the user name in facebook?

    What about this :

    $pageContent = file_get_contents('http://graph.facebook.com/USERID');
    $parsedJson  = json_decode($pageContent);
    echo $parsedJson->name;
    

提交回复
热议问题