构建应用内请求对话框

时间:2011-08-25 04:00:51

标签: facebook dialog

是否有办法构建自定义请求对话框,并发送所选的用户ID,即应用请求。我不想使用多朋友选择器表单。

1 个答案:

答案 0 :(得分:0)

此功能可让您向单个人发送请求。

<script>
function sendFriendInvite(message,title,to,data){
    FB.ui({method: 'apprequests', 
          to: to, 
          message: message, 
          title: title,
          data: data
         },
         function(response) {
            if (response && response.request_ids) {
              //Sent!
            } else {
              //Not Sent
            }
        }); 
}
</script>
<a onclick="sendFriendInvite('Here is an invite','Send to Invite to Friend', 123456);">Send request to friend 123456</a>