2013-04-25 89 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

希望這可以解決你想要的東西

相關問題