喜欢/推荐 显示相对于 www.facebook.com 的链接

发布于 2024-12-26 09:50:04 字数 679 浏览 1 评论 0原文

我建议为博客中的文章设置按钮。我的 OpenGraph 元标记已设置,并检查 facebook 调试器上的 url 显示了预期的信息(如下所示,经过混淆)

fb:app_id   xxx
og:url  http://example.com/blog/title-of-artilce
og:type article
og:title    Title of article
og:image    *correct image*
og:description  *description*
og:site_name    Sitename
og:updated_time 1326303278

但是,在用户的墙上,图像未显示且未显示。 URL 是相对于 facebook 显示的: http://www.facebook.com/blog/title-of-blog

无论推荐是在实际页面上,还是位于具有指向该页面的 URL 的不同页面上,问题都是相同的。 “喜欢”计数按预期发挥作用。

上面的更新时间表明它不应该是缓存问题。

任何帮助表示赞赏。

* 已解决 * - 提交给按钮的 URL 是相对的而不是绝对的。

I have recommend buttons setup for articles in a blog. My OpenGraph meta tags are setup and checking the url on the facebook debugger shows the expected information (shown below obfuscated)

fb:app_id   xxx
og:url  http://example.com/blog/title-of-artilce
og:type article
og:title    Title of article
og:image    *correct image*
og:description  *description*
og:site_name    Sitename
og:updated_time 1326303278

However, in the user's wall, the image is not shown & the URL is shown relative to facebook:
http://www.facebook.com/blog/title-of-blog

The problem is identical whether the recommend is on the actual page, or located on a different page with a URL directing to the page. The 'like' count functions as expected.

The updated time above shows that it shouldnt be a cache problem.

Any help appreciated.

* SOLVED * - URL submitted to button was relative rather than absolute.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

○闲身 2025-01-02 09:50:04

我犯了个愚蠢的错误。OG 中的链接不是完全限定的 URI。

因此,/foo/bar 被转换为 http://facebook/foo/bar >

Silly mistake on my part.. The links in OG were not fully qualified URIs ..

So, /foo/bar was being translated to http://facebook/foo/bar

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文