简体   繁体   中英

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. 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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM