Facebook Open Graph API - og:元标记被忽略 [英] Facebook Open Graph API - og:metatags being ignored

查看:130
本文介绍了Facebook Open Graph API - og:元标记被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在排除页面标题和图像未被包含在Facebook上的问题。打了OG调试器后,看起来没有一个 og:元标签正在被Facebook访问:

I'm troubleshooting an issue where the page title and image aren't being included on facebook likes. Having hit the OG debugger, it looks like none of the og:metatags are being accessed by facebook:

< a href =https://developers.facebook.com/tools/debug/og/object?q=http://transactivstaging.cloudapp.net:8080/Pages/ProductSummary.aspx?OrganizationProductID=617c54a0-189a​​-48af- 9b5e-002148210208& StoreID = a1d6bc99-9a6a-4e46-bdb4-790be4e59bd4& ProductID = d6748a89-41f4-48aa-a1c1-5c28f87cc47f& FBUserId = 100002152993326& PageName = MHMTest& PageID = 236549899706529& CurrentPage = 0rel =noreferrer>这是一个调试器的链接 - 这是说它推断出 og:url og:title 属性存在于页面上。

Here's a link to the debugger — it's saying it is inferring the og:url and og:title properties which are present on the page.

作为测试的问题,我从开发人员文档中的示例中直接复制了元标记和HTML模式,我仍然得到相同的警告。

As a matter of testing, I copied the metatags and HTML schema straight from the example on the developer docs and I still get the same warnings.

以下是生成的标签的HTML和开头:

Here's the HTML and start of the head tag as generated:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>123-ABC Butterfly Fun Carpet 3'10" x 5'5" Rectangle</title>
<meta name="description" content="Transactiv Products" />
<meta name="title" content="Transactiv" />
<meta property="fb:app_id" content="289501899130" />
<meta property="og:site_name" content="Transactiv InRecv" />
<meta property="og:url" content="http://localhost:2609/Pages/ProductSummary.aspx?OrganizationProductID=617c54a0-189a-48af-9b5e-002148210208&StoreID=a1d6bc99-9a6a-4e46-bdb4-790be4e59bd4&ProductID=d6748a89-41f4-48aa-a1c1-5c28f87cc47f&PageName=MHMTest&PageID=236549899706529" />
<meta property="og:title" content="123-ABC Butterfly Fun Carpet 3'10" x 5'5" Rectangle" />
<meta property="og:type" content="website" />
<meta property="og:description" content="" />
<meta property="og:image" content="http://transactivazureprod.blob.core.windows.net/pictureblob/831a4d4a-dbe3-44f5-9ff8-12286cdc33f5" />

有什么想法吗?

推荐答案

Facebook读取您可以在此输入您的网址的所有属性:
https://developers.facebook.com/tools/debug

Facebook reads all properties you can enter your url here: https://developers.facebook.com/tools/debug

Facebook将阅读您指定的属性,但有时只有当所有4被指定(而不是空)时才会使用它们,而不仅仅是最后3个。

Facebook will read the properties you specified, but sometimes will use them only when all 4 are specfied (and not empty), not only the last 3.

<meta property="og:url" content="YOUR_URL" />
<meta property="og:title" content="YOUR_TITLE" />
<meta property="og:description" content="YOUR_DESCRIPTION" />
<meta property="og:image" content="YOUR_IMAGE" />

这篇关于Facebook Open Graph API - og:元标记被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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