Crashalot
Crashalot

Reputation: 34503

Error when posting to Facebook wall with API: Error occured (#100) link URL is not properly formatted

Here is the code:

attachment = { message:'', name: 'post title', caption: 'user just did something',
                    link: 'post URL', action_links: [{ text: 'action link test', href: 'http://example.com'}]
                  };



FB.api('/me/feed', 'post', attachment, function(response) {
  if (!response || response.error) {
    alert('Error occured ' + response.error.message);
  } else {
    alert('Post ID: ' + response.id);
  }
});

Any clues?

Upvotes: 0

Views: 8178

Answers (2)

Zorox
Zorox

Reputation: 2035

Had same problem ... the issue was in the message (description) . i had an invalid URL. in my case i used a link to a non existing facebook page. it seems that facebook checks the validity of the page before linking it from the description. just check all your links before adding them in a posting description

i just fixed the url and every thing worked fine

Upvotes: 0

jcomeau_ictx
jcomeau_ictx

Reputation: 38412

You put a string 'post URL' for the link. link has to be a properly formatted URL like http://stackoverflow.com/.

Upvotes: 5

Related Questions