[英]How can I get a long lived accestoken with facebook php SDK
Hi I am using the JSDK to login with FB.login and then using the PHP SDK to get user information. 嗨,我使用JSDK登录FB.login,然后使用PHP SDK获取用户信息。 Now I need to get a extended accestoken but this simply don't work:
现在,我需要获取扩展权限,但这根本行不通:
$facebook->setExtendedAccessToken();
$access_token = $facebook->getAccessToken();
this throws the following error: 这将引发以下错误:
Fatal error: Call to undefined method Facebook::setExtendedAccessToken() in....
right now my accesstoken just works for a few minutes and this causes problems any ideas? 现在我的访问令牌只工作了几分钟,这会引起问题吗?
Update your SDK, https://github.com/facebook/facebook-php-sdk . 更新您的SDK, https://github.com/facebook/facebook-php-sdk 。 You are looking for this line https://github.com/facebook/facebook-php-sdk/blob/master/src/base_facebook.php#L351
您正在寻找此行https://github.com/facebook/facebook-php-sdk/blob/master/src/base_facebook.php#L351
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.