0

フィードにメッセージを投稿しようとしましたが、彼女はプロフィールにしか表示されません。

このメッセージをニュース フィードとプロフィール フィードに表示するにはどうすればよいですか?

これは私のサンプルコードです:

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

2 に答える 2

1

これを試して:

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


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

お役に立てば幸いです。その他のパラメータについては、 postparamsをお読みください

于 2011-02-10T00:39:46.013 に答える
0

申し訳ありませんが、これはダイアログ ボックスを表示しません。

アプリケーションを削除して再作成することで解決しました。

于 2011-02-10T10:35:16.187 に答える