Iphone Facebook邀请通知错误
我想向朋友发送Facebook邀请,但我不知道为什么会在接收端显示邀请 我用了这个密码Iphone Facebook邀请通知错误,iphone,ios,facebook,ios6,Iphone,Ios,Facebook,Ios6,我想向朋友发送Facebook邀请,但我不知道为什么会在接收端显示邀请 我用了这个密码 NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:nil]; [FBWebDialogs presentRequestsDialogModallyWithSession:nil
NSMutableDictionary* params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:nil];
[FBWebDialogs
presentRequestsDialogModallyWithSession:nil
message:[NSString stringWithFormat:
@"I just smashed friends! %d Can you beat it?",15]
title:@"MSR"
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Case A: Error launching the dialog or sending request.
NSLog(@"Error sending request.");
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
// Case B: User clicked the "x" icon
NSLog(@"User canceled request.");
} else {
NSLog(@"Request Sent.");
}
}}];
有人能帮我吗?猜猜看->
我在我的应用程序中使用了这段代码,但它工作得非常好。你可以试试这个
[FBWebDialogs presentRequestsDialogModallyWithSession:nil
message:@"Please come and try Thot Of U!"
title:@"Invite a Friend"
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 {
// Handle the send request callback
NSDictionary *urlParams = [self parseURLParams:[resultURL query]];
if (![urlParams valueForKey:@"request"]) {
// User clicked the Cancel button
NSLog(@"User canceled request.");
} else {
// User clicked the Send button
NSString *requestID = [urlParams valueForKey:@"request"];
NSLog(@"Request ID: %@", requestID);
}
}
}
}];