【发布时间】:2013-04-23 21:32:57
【问题描述】:
我想从 iOS 应用发布文本和链接到用户时间线。我复制并粘贴 FBWebDialogs 示例。
问题 1: 帖子出现在我的时间线中,但权限是“只有我”,不是朋友或公众。
问题 2: 结果对象 (FBWebDialogResult) 为零。日志出现在我的控制台中。NSLog(@"用户取消故事发布。");
问题 3: 预览框的权限是“只有我”,即使我将其设置为公开
我的Facebook页面的附加设置:
这是我的代码:
[FBWebDialogs presentFeedDialogModallyWithSession:nil
parameters:params
handler:
^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Error launching the dialog or publishing a story.
NSLog(@"Error publishing story.");
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
// User clicked the "x" icon
NSLog(@"User canceled story publishing.");
} else {
// Handle the publish feed callback
NSDictionary *urlParams = [self parseURLParams:[resultURL query]];
if (![urlParams valueForKey:@"post_id"]) {
NSLog(@"User canceled story publishing.");
} else {
NSString *msg = [NSString stringWithFormat:
@"Posted story, id: %@",
[urlParams valueForKey:@"post_id"]];
[[[UIAlertView alloc] initWithTitle:@"Result"
message:msg
delegate:nil
cancelButtonTitle:@"OK!"
otherButtonTitles:nil]
show];
}
}
}
}];
我的应用程序的设置页面默认为“只有我”。我不希望我的所有用户都在这里更改此设置。
【问题讨论】:
标签: ios objective-c facebook user-permissions