Facebook 点赞和分享信息未正确显示

发布于 2024-12-07 07:50:04 字数 1330 浏览 0 评论 0原文

我制作了我的网站我的短信好友,并且我添加了一个类似 facebook 的按钮来在 facebook 上分享我的网站。但是,每当我点击“赞”按钮时,它只显示我的网站网址,但不显示缩略图、标题、描述,尽管我已经为主页内的所有信息编写了代码。这是主页的示例代码

<head>
<meta property="og:title" content="My SMS Buddy" />
<meta property="og:type" content="activity" />
<meta property="og:url" content="http://www.eravikant.com" />
<meta property="og:image" content="http://www.eravikant.com/images/image.jpg" />
<meta property="og:site_name" content="My SMS Buddy" />
<meta property="fb:admins" content="100002723853376" />
<meta property="og:description" content="Share and Send Free Sms Anywhere In India Which Support Upto 160 Characters Long Sms Without Any Advertisements Attached with the Sms To Any Mobile In India With Easy Group Messaging" />
</head>

<body>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.eravikant.com&amp;send=false&amp;layout=box_count&amp;width=60&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font=segoe+ui&amp;height=90" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:60px; height:90px;" allowTransparency="true"></iframe>
</body>

需要建议,这里做错了什么...... 建议将不胜感激...

I made my website My SMS Buddy and i have included one facebook like button to sharing my website on facebook. But, whenever i clicked on the like button, it is only showing my website url,but it is not showing thumbnail,title,description, although i have written the code for all the information inside the main page. This is the sample code of the main page

<head>
<meta property="og:title" content="My SMS Buddy" />
<meta property="og:type" content="activity" />
<meta property="og:url" content="http://www.eravikant.com" />
<meta property="og:image" content="http://www.eravikant.com/images/image.jpg" />
<meta property="og:site_name" content="My SMS Buddy" />
<meta property="fb:admins" content="100002723853376" />
<meta property="og:description" content="Share and Send Free Sms Anywhere In India Which Support Upto 160 Characters Long Sms Without Any Advertisements Attached with the Sms To Any Mobile In India With Easy Group Messaging" />
</head>

<body>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.eravikant.com&send=false&layout=box_count&width=60&show_faces=true&action=like&colorscheme=light&font=segoe+ui&height=90" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:60px; height:90px;" allowTransparency="true"></iframe>
</body>

Need suggestion, what am doing wrong here...
Suggestion will be appreciated ...

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

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

发布评论

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

评论(1

公布 2024-12-14 07:50:04

您的页面的 HTML 中有一些非常奇怪的东西。您有重复的开始和结束 HEAD、BODY 以及包装 HTML 标记。这是无效的 HTML,根本无法解析。这也不会在网络浏览器中正确显示您的页面,因为它不知道要呈现 HTML 的哪一部分。这就是Facebook令人困惑的地方。

删除第一个 HTML 开头和结尾(及其内容),Facebook 应该可以正常获取您的 OG 元数据。它位于第二个 HTML HEAD 元数据中,看起来不错。

There are some really odd things in your page's HTML. You have duplicates of your opening and closing HEAD, BODY and wrapping HTML tags. This is invalid HTML and doesn't parse at all. This also won't show your page properly in web browsers since it won't know which part of the HTML to render. This is what is confusing Facebook.

Remove the first HTML opening and closing (plus its contents) and Facebook should get your OG Metadata fine. It's in the second HTML HEAD metadata and that looks fine.

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