Facebook send dialog to multiple friends using a recipients arrays

后端 未结 4 965
既然无缘
既然无缘 2020-12-16 00:28

The Facebook new Send Dialog lets people to send content to specific friends. But the API @ https://developers.facebook.com/docs/reference/dialogs/send/ said the parameter \

相关标签:
4条回答
  • 2020-12-16 00:47

    Seems both ways, direct URL and Javascript don't allow to use a list of ID's , just checked and verified it today

    0 讨论(0)
  • 2020-12-16 00:59

    It seems that currently the sdk only takes the first element from the array that is passed to "To" parameter. This is really annoying and no formal explanation is given to this design decision. I'd wish it can take more than one uids or emails, group names etc.

    0 讨论(0)
  • 2020-12-16 01:08

    I tried with a comma separated list of IDs, in the 'TO' field, and it worked ;)

    0 讨论(0)
  • 2020-12-16 01:09

    I'm not sure how you're doing it or what you define as "works", but the below kind of works:

    Go to the javascript test console here: https://developers.facebook.com/tools/console/ And type in the following, and hit run, it will bring up a send dialog with two names prepopulated. Unfortunately, when you hit send, it goes to an error page (still trying to figure that one out). But still, it does populate the dialog with two names :P

    <script>
        FB.ui(
         { 
          method: 'send', 
          to: [5,6],
          link: "https://developers.facebook.com",
          picture: "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/174597_20531316728_2866555_q.jpg"
         }, 
         function(param){
                // If they cancel params will show: 
                //    {action:false, ...}
                // and if they send the friend request it'll have:
                //    {action:true, ...}
                // and if they closed the pop-up window then:
                //    param is undefined
         }
        );
    </script>
    
    0 讨论(0)
提交回复
热议问题