Facebook - Post to multiple friends

I use the Javascript SDK to post something to the friends' wall of friends:

var publish = { method: 'stream.publish', message: 'Some kind of test', uid: uid, target_id: friendID, attachment: { name: 'Test', caption: 'Facebook API Test', description: ('Sure hope it worked!'), href: 'http://www.test.com/', media: [ { type: 'image', href: 'http://test.com/', src: 'http://test.com/image.jpg' } ] }, action_links: [ { text: 'Enigma Marketing', href: 'http://www.test.com/' } ], user_prompt_message: 'Share your thoughts about test' }; FB.ui(publish); return false; 

It works fine, but I was wondering if there is a way that I could post in MANY friends walls? I noticed that the pop shows the target friend in the list of few, so it seems that the publication of the publication can be published to more than one user. I can not find anything in the documentation, any help would be greatly appreciated.

+4
source share
1 answer

No, you cannot send messages to multiple streams of friends in one call.

The best way to do this is probably on the server side so that the user does not receive multiple requests. Please note that this is usually discouraging since it can be perceived as spam.

With your code, you can only loop for a portion of the send event:

 var publish = { method: 'stream.publish', message: 'Some kind of test', uid: uid, attachment: { name: 'Test', caption: 'Facebook API Test', description: ('Sure hope it worked!'), href: 'http://www.test.com/', media: [ { type: 'image', href: 'http://test.com/', src: 'http://test.com/image.jpg' } ] }, action_links: [ { text: 'Enigma Marketing', href: 'http://www.test.com/' } ], user_prompt_message: 'Share your thoughts about test' }; publish.target_id = friendID; FB.ui(publish); publish.target_id = friendID; FB.ui(publish); return false; 
+5
source

All Articles