4

最近、Facebook に投稿するコードを https://graph.facebook.com/[profile_id]/feed から https://graph.facebook.com/[profile_id]/links に切り替えました。

今、私はこの問題を抱えています。誰か助けてもらえますか? - 投稿に添付した私の写真が表示されません。Facebook がリンク ページで最初に見つけた画像にデフォルト設定されているようです。

http://developers.facebook.com/docs/reference/api/post/ http://developers.facebook.com/docs/reference/api/link/

これらのドキュメントの両方で画像を指定できますが、どういうわけか「リンク」のドキュメントに画像が表示されません。

前もって感謝します

4

3 に答える 3

1

正しい Open Graph メタ タグ、特に og:image を設定します。

于 2012-06-08T14:06:07.107 に答える
0

同様の問題を解決し、ウェブサイトにニュースを投稿し、/link を介してファンページに投稿しましたが、間違った画像コンテンツと「サイトが見つかりません」というタイトルの投稿で解決されました。

この問題は、間違ったコード シーケンスに関連していました。あまり良くない場所で、fb api を介してニュースを投稿するフックを作成しました。投稿は既に利用可能になっているはずですが、そうではありませんでした。fb api に投稿すると、facebookexternalhit ボットからすぐに、存在するかどうかを確認するように要求されます。詳細なログ分析により、facebook からの ping は、ニュースを追加するための POST が完了する前に行われたことが示されました。

上記の内容が当てはまらない場合は、投稿するサンプル コンテンツ: content_dict = {

'画像': ' http://www.czerwonysmok.pl/static/media/uploads/blog/pb_reddragon_all2_poprawiony_czerwony.jpg/ ',

'メッセージ': 'タイトル \n\n contentcontentcontentcontentcontentcontentcontent ',

「リンク」: ' http://www.czerwony-smok.pl/klub/aktualnosci/rashguard-ze-strony/ '}

try:
    logger.info("Publishing to facebook: " + str(content_dict))
    graph.post(path="%s/links" % settings.FAN_PAGE_ID, **content_dict)
于 2014-05-14T09:34:43.247 に答える
0

私のAndroidアプリでの共有について、私はこのコードを使用しています:

Bundle postParams = new Bundle();
postParams.putString("message", "User's custom message above share content");
postParams.putString("name", "The name of the link attachment.");
postParams.putString("description", "The description of the link (appears beneath the link caption). If not specified, this field is automatically populated by information scraped from the link, typically the title of the page.");
postParams.putString("caption","The caption of the link (appears beneath the link name). If not specified, this field is automatically populated with the URL of the link.");
postParams.putString("picture","The URL of a picture attached to this post. The picture must be at least 200px by 200px. See our documentation on sharing best practices for more information on sizes.");
postParams.putString("link", "The link attached to this post");    

詳細については、ドキュメントを参照してください: https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.3

于 2015-03-30T05:51:06.030 に答える