问题
Needs to resolve that procedure.
Now using the new javascript sdk, inside my "iframe tab".
Select friend(s)
Post in their wall.
1: not solved
I couldn't find a way of poping a "select a friend" dialog, trough the new api. The only mention in FB.ui is about a "friends dialog" used to "invite a friend".
Maybe I need a dialog ( which one ) to select a friend and than post? Ideally multi-friend selector so I can post to as many friends as a user can choose?
2: solved
( any other solution is welcome )
To post in a friends wall, I can simply fill the "to" param of the "feed dialog" as explained here: http://developers.facebook.com/docs/reference/dialogs/feed/
Some not so elegant solutions I found:
ask access to manage user friends then:
Do the multi selection pop up by myself
looks like redoing the wheel, some FBML pages solved that problem with a simple feed dialog with friend selector, as you can see here: http://www.facebook.com/chanel
Use a jquery plugin that parses the friends list and do the dialog for me
looks like a overkill / not working very well
I feel like I'm missing something ( this is my second work with the new js sdk ), such a easy task should be pretty straight forward to solve.
回答1:
To "invite friend" you have to look there : http://developers.facebook.com/docs/reference/dialogs/requests/
A simple example :
FB.ui({method: 'apprequests', message: 'Check out my super site', title:"Invite your friends."});
Feel free to ask any question if it's not clear ..
回答2:
You used to be able to use fb:friend-selector that would automatically autocomplete the users friends. It stopped working, so I ended up recreating it using jquery ui.
来源:https://stackoverflow.com/questions/5160851/facebook-js-sdk-select-a-friend-dialog-then-post-to-their-wall