1

Facebook SDK 3.0を使用しています

取り付けは簡​​単ですが、何かおかしいと思いました

リンクのサムネイルを表示できません

私のコードをチェックしてください、それは短いです

NSString *message = [NSString stringWithFormat:@"%@ is reading this news : \n %@", 
                                self.loggedInUser.first_name,[[dataList objectAtIndex:index] objectForKey:@"NewsURL"]];
           [FBRequestConnection startForPostStatusUpdate:message completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
//                    [self showAlert:message result:result error:error];
           }];

それだけです〜

しかし、それは壁にリンクを投稿するだけで、画像はありません...

ステータスを更新するために同じURLを投稿しようとしましたが、サムネイル画像を表示できます。

サンプルURLはこちら

http://www.cronicadelquindio.com/noticia-completa-titulo-policia_homenajeo_a_ninos_enfermos_de_cancer__recibieron_el_grado_de_capitan_honorario-seccion-judiciales-nota-50748.htm

Facebook API を使用する際に見逃しているものは何ですか ???

返信または回答が役立ちます

ありがとう

ウェーバー

** * ** * ** * ** * ** * *編集* ** * ** * ** * ** * ** * ****

使用する必要がありますFBRequestConnection startWithGraphPath

だから、これらは私の最終的な解決策です

NSMutableDictionary *postParams =  [[NSMutableDictionary alloc] initWithObjectsAndKeys:newsURL, @"link",
                                                                             newsTitle,@"name",nil];

           [FBRequestConnection startWithGraphPath:@"me/feed"
                                        parameters:postParams
            HTTPMethod:@"POST"
            completionHandler:^(FBRequestConnection *connection,id result,NSError *error) {
}];
           [postParams release];

また、このリンクを参照してください

4

2 に答える 2

2

messageURL をプレーン テキストとしてパラメーターに入れています。

link代わりにパラメータに入れてみてください。

于 2012-08-15T12:50:33.667 に答える
1

私の場合、以下のコード スニペットを使用して、ビデオ URL を Facebook のリンクとして公開できました。

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                           g_videoURL, @"link",
                                           VideoDescriptionHeading, @"message",
                                           VideoThumbURL, @"picture",
                                           VideoTitle, @"name",
                                           VideoDescription, @"description",

                                           nil];

            [[appDelegate facebook] requestWithGraphPath:@"me/feed"
                                               andParams:params
                                           andHttpMethod:@"POST"
                                             andDelegate:self];
于 2012-11-29T07:04:17.477 に答える