我正在尝试使用 Facebook iOS SDK 使用内置请求对话框发送 Facebook 应用程序请求。请求发送没有问题,但我得到的对话框中有问题,在下面的屏幕截图中:
如您所见,它与 Facebook 文档部分中显示的请求对话框以及我在其他 iOS 应用程序中看到的请求对话框有很大不同:
(来源:akamaihd.net)
- 取消和发送按钮坏了(它们可以工作,但看起来很奇怪)
- 除非我设置“to”参数,否则它不会显示请求预览
- 'title' 参数被忽略
这是我用来显示请求对话框的代码:
params[@"data"] = [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:@{@"q" : NSInt(question.ID)} options:0 error:nil] encoding:NSUTF8StringEncoding];
[FBWebDialogs presentRequestsDialogModallyWithSession:[FBSession activeSession]
message:@"THIS IS A MESSAGE"
title:@"THIS IS A TITLE"
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. %@", params);
}
}}];
我正在使用 Facebook iOS SDK 3.9.0。还有其他人经历过这样的事情吗?难道我做错了什么?
任何帮助表示赞赏,在此先感谢。