Facebook 点赞按钮问题
我们在使用“点赞”按钮时遇到了一些问题。上周看起来还可以,但突然就停止了。
基本上,当点击“喜欢”时,我们会收到一条错误消息:
您未能提供有效的列表 管理员。您需要提供 管理员使用“fb:app_id” 元标记,或使用“fb:admins”元 标签指定以逗号分隔的列表 Facebook 用户数量。
我们的 部分如下所示:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
<head>
<meta property="fb:app_id" content="number"/>
<meta property="fb:admins" content="number"/>
<meta property="og:title" content="title"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="url with trailing slash"/>
<meta property="og:image" content="url to image"/>
<meta property="og:site_name" content="Site Name"/>
</head>
We're having some trouble getting our like button to work. It seemed to work last week but suddenly it's stopped working.
Basically when clicking "Like", we get an error saying:
You failed to provide a valid list of
administators. You need to supply the
administors using either a "fb:app_id"
meta tag, or using a "fb:admins" meta
tag to specify a comma-delimited list
of Facebook users.
Our <head>
section looks like this:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
<head>
<meta property="fb:app_id" content="number"/>
<meta property="fb:admins" content="number"/>
<meta property="og:title" content="title"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="url with trailing slash"/>
<meta property="og:image" content="url to image"/>
<meta property="og:site_name" content="Site Name"/>
</head>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
以下是解决您问题的一种方法: -
1 转到 https://developers.facebook.com/tools /lint/
2 在“输入 URL”中,粘贴“赞”按钮不起作用的页面 URL(例如 http://www. mywebsite.com/my-article/)
3 单击 Lint 按钮
应该可以了,现在您可以访问您的页面来尝试“赞”按钮。
4 如果仍然不起作用,Lint 工具会向您显示结果。一直向下滚动,您会看到有一个“赞”按钮。
5 单击“喜欢”按钮(基本上您喜欢有缺陷的页面)
那应该可以解决它。如果没有,那么您可能需要等待 Facebook 修复它。
Here are one method to solve your problem: -
1 Go to https://developers.facebook.com/tools/lint/
2 In the Input URL paste your page URL where the like button is not working (e.g http://www.mywebsite.com/my-article/)
3 Click the Lint button
That should do, now you can go and visit your page to try the Like button.
4 IF it still does not work, when the Lint tool shows you the result. Scroll all the way down and you will see that there is a Like button.
5 Click that Like button (basically you are liking the flawed page)
That should solve it. If not, then you probably have to wait for facebook to fix it.
http://developers.facebook.com/docs/opengraph
http://developers.facebook.com/docs/opengraph
解决方案是使用 fb 命名空间而不是 og 命名空间:
即使认为所有元标记都在 og 命名空间中,但这两个却不是!这在语义上是有道理的,但考虑到 Facebook 文档的参差不齐(就拼写错误和旧信息而言),我认为很容易假设它应该是 og(就像我所做的那样!)。
确保您还将命名空间声明添加到 IE6 的 html 标记中!
The solution to this is to use the fb namespace instead of the og namespace:
Even thought all the meta tags are in the og namespace, these two are not! It makes sense semantically, but given how spotty the Facebook docs are (in terms of typos and old info), I think it's really easy to assume that it should be og (as I did as well!).
Make sure you also add the namespace declarations to your html tag for IE6!
首先检查两件事:
这可能是你问题的答案。
Check two things first:
It may be the answer for your question.
更改
为
在进行此更改之前遇到相同的问题(错误?)。
Change
to
Had the same issue until made this change (bug?).