I am using the following code to post into users wall.I took this code from developer.facebook. But getting error like "An error occurred. Please try again later" while opening the dialog.
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"
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
Please share ideas to fix this
In my case i just set my application at the facebook developer site to be public

You have a syntax error on the description: line. this code:
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 applic\
ations'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
Works on fbrell.com for me.
eosgood is right, you have a type-o in your code. However, for others, this might help...
I had the same problem. Things to try:
- Move the FB.ui javascript to the very end of the page, so it's the last script executed.
- Doublecheck to make sure you have
<div id="fb-root"></div>
immediately after the opening body tag.
来源:https://stackoverflow.com/questions/12403869/feed-dialog-an-error-occurred-please-try-again-later