2012-06-08 80 views
4

我最近切換我的代碼張貼到facebook從 https://graph.facebook.com/[profile_id]/feed 到 https://graph.facebook.com/[profile_id]/linksFacebook的圖形API後使用「/我/飼料」與「/我/鏈接」

現在我遇到了這個問題,任何人都可以幫忙嗎? - 我的照片,我用後沒有顯示陪伴,它看起來像Facebook被默認爲它的鏈接頁面

http://developers.facebook.com/docs/reference/api/post/ http://developers.facebook.com/docs/reference/上找到的第一個圖像api/link/

這兩個文件都允許我指定圖片,但不知何故「鏈接」一個不顯示圖片。

在此先感謝

回答

1

設置正確的Open Graph元標記,尤其是og:image。

+0

感謝您的答覆,我 –

+0

已通過添加試試這個但這似乎不起作用,但我認爲我更感興趣動態地改變我的形象,而不是默認它只有一個圖片 –

0

我剛剛解決了類似的問題,在網站上張貼了新聞,並通過/鏈接發佈到Fanpage上,解決了後期錯誤的圖像內容和「網站未找到」標題。

該問題與錯誤的代碼序列有關。我們通過fb api在不太好的地方吸引了發佈消息。該帖子應該已經可用,但它不是,並且發佈到fb api會立即請求facebookexternalhit bot檢查它是否存在。詳細的日誌分析顯示,來自Facebook的ping是在POST之前添加新聞完成的,這就是爲什麼我們在那裏搞混了內容。

樣的內容我們將公佈,如果我上面所描述的不是你的情況: content_dict = {

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

'消息':「標題\ n \ n contentcontentcontentcontentcontentcontentcontentcontent '

'鏈接':' 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) 
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

相關問題