I have built a Facebook app using the Javascript SDK that has been up and running for about 6 months, it has been working fine and publishing a post to a users wall if they beat their current best score. It was working up until now. The app itself is still working but the ability to publish a post to the users feed seems to have broken and I am not able to figure out why?.
I have not changed any code in my app and have also tested the code in another of my apps and it works fine. The app has all the correct permission requests, which I and my users seem to have. I haven’t received any mail from facebook saying they have blocked my publishing rights for any reason. Does any one have any ideas why this has happened?
Here is the code for publishing:
var params = {};
params['message'] = 'Just achieved my highest score';
params['name'] = 'Game Name';
params['caption'] = "Caption";
params['link'] = 'my link to my app';
params['picture'] = 'a link to a pic for my app';
params['description'] = 'Description of my app';
FB.api('/me/feed', 'post', params, function(response)
{
if (!response || response.error)
{
//alert(response.error);
} else {
//alert('Post ID: ' + params['message']);
}
});
The response returned is error, but it never used to be?
Any help would be appreciated. Thank you
The policy for publishing in user stream has simply changed.
See there:
https://developers.facebook.com/docs/reference/rest/stream.publish/.