Search code examples
facebooksocial-networkingfbmlfacebook-javascript-sdkinvite

What's the Facebook Javascript SDK equivalent of fb:req-choice?


I can post an apprequest from my site onto selected friends' walls with a call to FB.ui. I'm doing this to replace an old call that goes via some FBML, namely fb:multi-friend-selector. What isn't clear from the documentation is how to do the equivalent of fb:req-choice using the new API?


Solution

  • I think you could use this from the JS SDK:

         function sendRequestToOneRecipient() {
            var user_id = document.getElementsByName("user_id")[0].value;
            FB.ui({method: 'apprequests',
              message: 'My Great Request',
              to: user_id, 
            }, requestCallback);
          }