試圖打開一個對話框飼料時,我收到以下錯誤..當試圖打開一個對話框飼料
出錯獲取錯誤。請稍後再試。
我是否需要讓用戶授權應用程序在牆上張貼?我認爲它不會因爲這不會被應用程序本身自動發佈到用戶的牆上。另外,我在使用我的管理員帳戶時遇到錯誤。
這裏是我的代碼:
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'xxxxxxxxxxxxxxx', // App ID
channelURL : 'http://localhost/foods/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
oauth : true, // enable OAuth 2.0
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
function postToFeed() {
// calling the API ...
var obj = {
method: 'feed',
link: 'https://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
name: 'Facebook Dialogs',
caption: 'Reference Documentation',
description: 'Using Dialogs to interact with users.'
};
function callback(response) {
document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
}
FB.ui(obj, callback);
}
</script>
<a href="javascript:void();" onclick="postToFeed();"><img src="images/share.gif" /></a>
可能重複的[重定向到認證對話框 - 「出現錯誤,請稍後再試」](http://facebook.stackoverflow.com/questions/7231939/redirecting-to-authentication-dialog-an-error-發生,請試,再次下旬) –