Is there a way of building a custom request dialog, and sending the selected userid(开发者_如何学JAVAs), the app request. I don't want to be using the multi-friend selector form.
This function here should provide you the ability to send a request to a single person.
<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>
精彩评论