ios - Facebook ios-sdk : feed post don't show on News Feed

标签 ios facebook facebook-graph-api facebook-ios-sdk

我尝试发布消息来供稿,但她只显示在个人资料中。

如何使此消息显示在新闻源和个人资料源上?

这是我的示例代码:

SBJSON *jsonWriter = [[SBJSON new] autorelease];

NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
                                                       _gameName,@"text",_gameLink,@"href", nil], nil];

NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];


NSDictionary* imageShare = [NSDictionary dictionaryWithObjectsAndKeys:
                            @"image", @"type",
                            _imageURL, @"src",
                            _gameLink, @"href",
                            nil];


NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
                            title_, @"name",
                            //@"teste", @"caption",
                            _msg, @"description",
                            [NSArray arrayWithObjects:imageShare, nil ], @"media",
                            _gameLink, @"href", nil];

NSString *attachmentStr = [jsonWriter stringWithObject:attachment];

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"Share on Facebook",  @"user_message_prompt",
                               actionLinksStr, @"action_links",
                               attachmentStr, @"attachment",
                               nil];


[_facebook dialog:@"feed" andParams:params andDelegate:self];

如果我尝试使用不带参数的方式发布,则消息会显示在两者中:

[_facebook dialog:@"feed" andDelegate:self];

最佳答案

试试这个:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"some text", @"message",
                               nil];


[facebook requestWithGraphPath:@"/me/feed" andParams:params
                 andHttpMethod:@"POST" andDelegate:self];

希望对您有帮助。 有关更多参数,请阅读 post params

关于ios - Facebook ios-sdk : feed post don't show on News Feed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4898629/

相关文章:

iphone - iPhone 上的 facebook 连接 - 调用电话时出现错误 102 "Session key invalid or no longer valid",但流对话框仍然有效

java - keytool不会提示输入android密码

facebook - 我 friend 的 Open Graph 内置操作(如 video.watches 或 news.reads)总是空的

php - 创建广告集时如何使用保存的受众作为目标规范

php - 如何在新版本的 ios 中使用 php 从服务器在 ios 中发送推送通知,而不使用 pem 文件

ios - 在 UIActionSheet 中存储上下文信息

facebook - 通过一项请求即可获取所有联系人的高分辨率个人资料图片网址。 Facebook API

facebook-graph-api - Facebook API - 如何发布/分享大照片

ios - 当我使用 CNContactPicker 时隐藏联系人详细信息中的操作按钮

ios - 如何更改后退按钮颜色 iOS 7