【问题标题】:Facebook ios-sdk: feed post don't show on News FeedFacebook ios-sdk:提要帖子不显示在新闻提要上
【发布时间】:2011-02-04 13:44:32
【问题描述】:

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

如何让这条消息显示在新闻提要和个人资料提要上?

这是我的示例代码:

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];

【问题讨论】:

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


    【解决方案1】:

    试试这个:

    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"some text", @"message",
                                   nil];
    
    
    [facebook requestWithGraphPath:@"/me/feed" andParams:params
                     andHttpMethod:@"POST" andDelegate:self];
    

    希望对你有所帮助。 更多参数请阅读post params

    【讨论】:

    • 我不认为这会显示提要对话框。它只是直接发布,对吧?
    • 是的,只是在 Facebook 墙上发帖。
    【解决方案2】:

    抱歉,这不显示对话框。

    我通过删除并重新创建应用程序解决了问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多