my name is xyz
my name is xyz

Reputation: 349

Feed Dialog - "An error occurred. Please try again later"

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

Answers (3)

evya
evya

Reputation: 3657

In my case i just set my application at the facebook developer site to be public

set the app public

Upvotes: 10

mrbinky3000
mrbinky3000

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:

  • 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.

Upvotes: -1

eosgood
eosgood

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

Related Questions