答案 0 :(得分:0)
您甚至可以立即发送邀请:
尝试此代码....
[FBWebDialogs
presentRequestsDialogModallyWithSession:nil
message:@"YOUR_MESSAGE_HERE"
title:nil
parameters:nil
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Error launching the dialog or sending the request.
NSLog(@"Error sending request.");
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
// User clicked the "x" icon
NSLog(@"User canceled request.");
} else {
NSLog(@"Request Sent.");
}
}
}];
希望这会对你有所帮助。
答案 1 :(得分:0)
使用此代码可以邀请您 facebook脚本部分。
<script>
document.getElementById("apprequest").onclick = function(){
FB.ui({method: 'apprequests',
message: 'YOUR_MESSAGE_HERE'
}, function(response){
alert("Success");
//console.log(response);
});
}
</script>
HTML部分
<body>
<div id="fb-root">
<button id="apprequest" name="btnLogin" >App Request</button>
</div>