Facebook Graph API:发布链接/缩略图不显示 [英] Facebook Graph API : Posting Links / Thumbnail not displaying

查看:171
本文介绍了Facebook Graph API:发布链接/缩略图不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过Facebook Graph API发布了一个链接。我看到链接,但缩略图图像没有按预期显示。



以下是一个示例URL: http://barcodegen.herokuapp.com/coupon?couponId=8f9436f6-f1b3-42ec-900c-be45305e1aa6



我已经运行它了。 http: //developers.facebook.com/tools/debug/og/object?q ,并没有报告任何错误,并按预期显示缩略图。



当我粘贴在Facebook上的链接direclty似乎检测元标记,但当我发布链接从我的服务器端Java应用程序,它似乎没有检测到是正确的。这是我的服务器端应用程序所做的工作:


  1. 生成唯一键

  2. li>
  3. 使用元标签等向Facebook发布链接。

我缺少什么? p>

解决方案

我希望您将访问令牌作为唯一密钥。



有同样的问题。我解决如下。我正在使用 C#Facebook SDK 。但我希望你能得到这个想法。

  Dim fb As FacebookClient = New FacebookClient('access_token')

Dim args As Dictionary(Of String,Object)=新词典(Of String,Object)()

args(message)=要发布的消息
args (link)=http://www.example.com

fb.Post(/ me / feed,args)
/ pre>

然后Facebook自动提取预览图像,其他元数据并自行发布。


I'm posting a link through the Facebook Graph API. I see the link but the thumbnail image is not appearing as expected.

Here's an example URL: http://barcodegen.herokuapp.com/coupon?couponId=8f9436f6-f1b3-42ec-900c-be45305e1aa6

I've run it throigh http://developers.facebook.com/tools/debug/og/object?q and that does'nt report any errors and displays the thumbnail image as expected.

When I paste the link direclty on facebook it seems to detect the meta tags but when I post the link from my server side Java app, it does'nt seem to detect is correctly. Here's what my server side app does:

  1. Generate a unique key
  2. Store in DB
  3. Post the link to Facebook with the meta tags etc.

What am I missing?

解决方案

I hope you mean access token as the unique key.

I had same issue. I solve as following. I was using C# Facebook SDK. But i hope you can get the idea.

    Dim fb As FacebookClient = New FacebookClient('access_token')

    Dim args As Dictionary(Of String, Object) = New Dictionary(Of String, Object)()

    args("message") = "Message to be posted"
    args("link") = "http://www.example.com"

    fb.Post("/me/feed", args)

Then Facebook automatically fetches preview image, other meta data and post it self.

这篇关于Facebook Graph API:发布链接/缩略图不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆