题
我必须扩展数据库中存储的所有用户的离线访问令牌
在这里我找到了方法https://developers.facebook.com/docs/offline-access-deprecation/
但是当我使用这个电话时
https://graph.facebook.com/oauth/access_token?
client_id=APP_ID&
client_secret=APP_SECRET&
grant_type=fb_exchange_token&
fb_exchange_token=EXISTING_ACCESS_TOKEN
对于某些用户,我得到了新的令牌
access_token=xxxxxxx&expires=5102358
对于其他人,我什么都没有收到?
我使用此代码
$request_url = "https://graph.facebook.com/oauth/access_token?client_id=xxxx&client_secret=xxxx&grant_type=fb_exchange_token&fb_exchange_token=xxxx";
$ info = file_get_contents($ request_url);
在此先感谢您的帮助。
解决方案
当您尝试将其转换时,其他用户的访问令牌可能已经到期了。您只能扩展非预期的访问令牌。一旦到期后,您将需要让您的用户回到应用程序进行重新申请。
不隶属于 StackOverflow