我的代码是
include_once "fbaccess.php";
$user_id = $facebook->getUser();
var_dump($user_id);
var_dump($facebook);
结果: -
int(0) // Why $user_id return zero
object(Facebook)#1 (7) {
["appId":protected]=> string(15) "4545454"
["appSecret":protected]=> string(32) "323232"
["user":protected]=> int(0)
["signedRequest":protected]=> NULL
["state":protected]=> string(32) "c8d6e657da34596785b06e7511921529"
["accessToken":protected]=> string(48) "{APP_SECRET}"
["fileUploadSupport":protected]=> bool(false) }
请帮帮我。哪个我错过了????
答案 0 :(得分:0)
查看https://developers.facebook.com/docs/php/gettingstarted并坚持给出的示例。您发布的代码不完整,不会像这样工作。