例如,生成與用於登錄的iFrame對話框不同的iFrame對話框是否需要access_token?如果是這樣,我應該使用哪個URL來獲取訪問令牌以生成iFrame的提要對話框?在Facebook的API中是否有不同類型的訪問令牌?
我問這個問題,因爲我嘗試手動使用以下URL(我的文檔中找到)
https://graph.facebook.com/oauth/access_token產生一個訪問令牌? 類型= client_cred &的client_id = CLIENT_ID & client_secret = CLIENT_SECRET
我收到一個訪問令牌回來,但是當我用它像這樣:
FB.ui({
method: 'feed',
name: 'Facebook Dialogs',
link: 'http://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
message: 'Say something about the tickets you just bought',
display: 'iframe',
access_token: ACCESS_TOKEN; //access_token returned by the above URL
},
function(response) {
if (response && response.post_id) {
console.log('Post was published.');
} else {
console.log('Post was not published.');
}
}
);
Facebook的飼料對話框將保持加載屏幕上3條永遠。
所以我要求錯誤的access_token?爲什麼Facebook對話框沒有加載?
注意:這是所有在客戶端JavaScript。
幾點使其更加準確:1)用戶,應用和頁面有3種不同的令牌。 2)offline_access權限是針對用戶而不是針對app令牌的。 – 2011-10-03 00:48:23