我正在尝试使用以下代码(来自此处的 Facebook 文档)实现 facebook 邀请。
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:nil];
[FBWebDialogs presentRequestsDialogModallyWithSession:nil
message:[NSString stringWithFormat:@"Can you beat my highscore of %@ points on Footy Face-Off?", formattedString]
title:nil
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.");
}
}}];
问题是,它不是显示 Facebook 文档中的对话框,而是显示this。
即使我已登录 facebook 并拥有所需的权限,发送请求也不会执行任何操作。最终我要问的是,我做错了什么,我没有从 Facebook 文档中生成请求。非常感谢任何帮助或建议。