im using the js sdk to post message to friends wall from my website through an app i created in facebook. the code above is going well when i post to single wall. the problem i want to post to multiple walls the same message at the same time and without popup or dialog appearing. i know it must be done by looping but cant get it working .
my code is
var publish =
{
method: 'stream.publish',
// display: 'popup',
attachment:
{
name: 'name' ,
caption: 'www.caption.com' ,
description: ('description'),
href: 'url',
media: [
{
type: 'image',
href: 'url',
src: 'url'
}
]
}
};
publish.target_id =id1;
FB.ui(publish);
publish.target_id = id2;
FB.ui(publish);
return false;
}
any kind of help will be apreciated.
thanks
Due to: http://developers.facebook.com/policy/
You should avoid to post same message to multiple walls the same time.
edit:
But if you really wan’t to do it:
You should not use Fb.ui(), that is used for Facebook Dialogs.
Instead you may use:
So, you just have to loop your UserIDs, and replace the “me” with the user_id.