2012-06-08 82 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

相关问题