Post to the wall using the Facebook API

I would like users to be able to post to their wall from my site. When I click on the link to the FB link, the Facebook popup simply says "An error has occurred. Please try again later." Firebug just says the "Image is corrupted or truncated" error. I get the same message if you try to use any FB method, for example FB.login or FB.getLoginStatus. I know that there is not much to leave, but does anyone have any ideas on what is going wrong, or is there a better way to debug this?

function load_FB(){ FB.init({ appId : xxxxxxxxxxxxxxxx, status : true, cookie : true, xfbml : true }); } var publish = {method: 'feed', message: 'my message'}; function publish_wall_post() { FB.ui(publish); } 
+7
source share
2 answers

thinkdiff has a great working example on how to post to the wall. http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development/

+2
source

Take a look at the FB.ui docs at https://developers.facebook.com/docs/reference/javascript/FB.ui/

  FB.ui( { method: 'feed', name: 'Facebook Dialogs', link: 'https://developers.facebook.com/docs/reference/dialogs/', picture: 'http://fbrell.com/f8.jpg', caption: 'Reference Documentation', description: 'Dialogs provide a simple, consistent interface for applications to interface with users.', message: 'Facebook Dialogs are easy!' }, function(response) { if (response && response.post_id) { alert('Post was published.'); } else { alert('Post was not published.'); } } ); 
+3
source

All Articles