Facebook js sdk: "select a friend" dialog, then post to their wall?

14.4k views Asked by At

Needs to resolve that procedure.

Now using the new javascript sdk, inside my "iframe tab".


  1. Select friend(s)

  2. 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:

  1. 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

  2. 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.

2

There are 2 answers

4
dwarfy On

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 ..

0
Tom Kincaid On

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.