I have a facebook app and trying to publish a post to user’s wall, without notyfing the user with any kind of pop-up dialog (for users have granded the publish_stream oauth permission).
I’ve been searching a lot, and tried many different things, used FB.ui or FB.api, but i can’t get it to work properlly, i either get the pop-up notification, or nothing at all.
Following the answer here, i have this code, but it just does nothing, it just alerts “undefined” (as the post didn’t get published, there is no post_id)
var publish = {
method: 'stream.publish',
message: 'Test Message',
picture : 'http://www.mydomain.gr/apps/app1/img/small.png',
link : 'http://www.mydomain.gr/apps/app1/',
name: 'THIS IS MY APPLICATION!',
caption: ' ',
description: 'I just used this app and i loved it!!',
actions : { name : 'Use me!', link : 'http://www.mydomain.gr/apps/app1/'}
};
FB.api('/me/feed', 'POST', publish, function(response) {
alert(responce.post_id)
});
Any ideas how i can achieve it?
Thanks in advance.
What you are trying to do is against Facebook rules!
Each message you want to post to a user wall has to be seen first by the user and approved. Read the Facebook platform policy and pay attention to Section IV paragraph 3.