[英]facebook app token instead user token php sdk
i don't know why when i'm using facebook php sdk 3.1.1 on codeigniter with following code: 我不知道为什么当我在codeigniter上使用facebook php sdk 3.1.1时使用以下代码:
...
...
$this->config->load('facebook', TRUE);
$config = $this->config->item('facebook');
$this->load->library('facebook', $config);
echo $this->facebook->getAccessToken();
....
i retrieve app access token instead ( the correct ) user access token. 我检索应用程序访问令牌(正确的)用户访问令牌。
infact when i try to call 事实上我试着打电话
$this->facebook->api('/me')
php return me an error like this php给我一个这样的错误
Fatal error : Uncaught OAuthException: An active access token must be used to query information about the current user.
致命错误 :未捕获OAuthException:必须使用活动访问令牌来查询有关当前用户的信息。 thrown in /srv/www/...
抛出/ srv / www / ...
i've try to change library version until 3.0, but nothing changed 我试图将库版本更改为3.0,但没有任何改变
Anyone know something about that? 有人知道这个吗?
/me
returns your personal profile info. /me
返回您的个人资料信息。 If you want to query /me
, you need to authenticate via a user access token, which is above the app level access token. 如果您想查询
/me
,您需要通过用户访问令牌进行身份验证,该令牌位于应用级访问令牌之上。
Peruse at your leisure: https://developers.facebook.com/docs/authentication/ 在您的闲暇时间阅读: https : //developers.facebook.com/docs/authentication/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.