Reputation: 349
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
Upvotes: 2
Views: 8339
Reputation: 3657
In my case i just set my application at the facebook developer site to be public
Upvotes: 10
Reputation: 4301
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:
<div id="fb-root"></div>
immediately after the opening body tag.Upvotes: -1
Reputation: 308
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.
Upvotes: 0