2013-04-25 92 views
0

这就是FB degugger说Facebook的长寿命令牌不工作

应用程序ID: MY_APP_ID:APP_NAME

元数据:[]

用户ID:

USER_ID:NAME

已发行:未知

过期:1366920000(约1小时)

有效期:真

来源:网络

的范围:create_note manage_pages photo_upload publish_actions publish_stream read_stream share_item status_update user_groups video_upload

+0

所以..它怎么不工作NG? – asifrc 2013-04-25 19:42:26

回答

3

在由JavaScript SDK

FB.login(function(response) { 
    if (response.status=='connected') { 
    if (response.authResponse.accessToken) { 
    var token = response.authResponse.accessToken; 
      ............rest of the codes 

首先生成一个临时令牌,然后在服务器端延伸到以下网址您的令牌使用curl调用来获取最终的令牌 -
https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=APP_ID&client_secret=APP_Client_Secret&fb_exchange_token=your_temporary_token

希望这可以解决你想要的东西