Facebook的新发送对话框允许人们向特定的朋友发送内容。但是API @ https://developers.facebook.com/docs/reference/dialogs/send/ 表示参数“TO”表示“用户ID或用户名”。
我想知道是否有一种方法可以一次向多个朋友发送消息。我尝试将“to”设置为JavaScript数组,但那样不起作用。
我想知道是否有一种方法可以一次向多个朋友发送消息。我尝试将“to”设置为JavaScript数组,但那样不起作用。
目前看来,SDK只会获取传入"To"参数的数组中的第一个元素。这真的很让人恼火,并且没有正式的解释来说明这个设计决定的原因。我希望它可以获取多个UID、电子邮件、组名等。
<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>
似乎无论是直接URL还是JavaScript都不允许使用ID列表,我今天刚刚检查并验证了这一点。