开发者

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

I try to post a message to feed, but her show only in profile.

How to do make this message show on news feed and profile feed?

This is my sample code:

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

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

NSString *actionLinksS开发者_如何学编程tr = [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];

If I try to post using without params, the message show in both:

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


Try this:

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


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

I hope it is help. For more parameters read post params


Sorry, but this don't show dialog box.

I solved by deleting and recreating the application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜