我将编写一个将作为 cron 运行的 Facebook Graph 脚本/应用程序。我之前尝试过这样做,但它说访问令牌已过期。我尝试使用getAccessToken()
,但它告诉我必须使用有效的访问令牌来请求有关当前用户的信息。如何自动更新我的访问令牌,这样我的 cron 工作就不会中断?
问问题
1922 次
2 回答
0
The normal access token expires in 2 hours, and the extended token lasts for 2 months. For the extended token guide, go though this: How to extend access token validity since offline_access deprecation
Now, the best thing you can do is to update regularly this extended token of the user when he log-in the app/website. So, you can use this token in your cron job. This will fail only when the user didn't visit your app for 2 months.
于 2012-12-22T09:53:41.580 回答
0
于 2012-12-22T10:00:19.100 回答