Facebook 分享按钮与描述集成,图片问题!
我在与我的网站集成共享按钮时遇到问题。 当我点击分享时,它只显示我的网站网址。它不显示图像和描述可能是什么问题???
下面是我的代码:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Welcome Facebook Read Eval Log Loop</title>
<meta name="description" content="Examples for the Facebook Platform.">
<meta name="keywords" content="facebook, connect, facebook connect, javascript, examples, javascript sdk, javascript library, library, howto, tutorial, api, facebook apisdk">
<meta property="fb:admins" content="5526183">
<meta property="fb:app_id" content="123865001025929">
<meta property="og:image" content="https://fbrell.com/logo.jpg">
<meta property="og:type" content="website">
<meta property="og:url" content="http://fbrell.com/">
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : '123865001025929',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
</script>
<fb:share-button href="http://fbrell.com" type="button"> </fb:share-button>
</body>
</html>
I am facing problem in share button integration with my website.
When i click share it is only showing my website url.It is not showing image and description what might be the problem ???
Below is my code:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Welcome Facebook Read Eval Log Loop</title>
<meta name="description" content="Examples for the Facebook Platform.">
<meta name="keywords" content="facebook, connect, facebook connect, javascript, examples, javascript sdk, javascript library, library, howto, tutorial, api, facebook apisdk">
<meta property="fb:admins" content="5526183">
<meta property="fb:app_id" content="123865001025929">
<meta property="og:image" content="https://fbrell.com/logo.jpg">
<meta property="og:type" content="website">
<meta property="og:url" content="http://fbrell.com/">
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : '123865001025929',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
</script>
<fb:share-button href="http://fbrell.com" type="button"> </fb:share-button>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
og:title
,因此需要添加它,例如:fb:share-button
!使用 Like 插件og:title
so you need to add it, something like:<meta property="og:title" content="Welcome Facebook Read Eval Log Loop"/>
fb:share-button
! use the Like plugin instead它似乎适用于 facebook linter :
http ://developers.facebook.com/tools/lint/?url=http%3A%2F%2Ffbrell.com%2F
无论如何,最好始终使用linter(在上面的链接中),以便它为您提供关于你的og标签的警告和错误,它还强制facebook刷新关于你页面的缓存信息,在你的情况下,在你添加标签后尚未刷新,我想,所以你没有看到你最后的更改......它是当您分享某些内容时 Facebook 会使用这些信息。
现在可以用了吗?
顺便说一句,它给出了这个:
It seems to work with the facebook linter :
http://developers.facebook.com/tools/lint/?url=http%3A%2F%2Ffbrell.com%2F
Anyway it's best to always use the linter (in the link above) so that it gives you warnings and errors about your og tags, an ALSO it force facebook to REFRESH its cached information about your page, which in your case was not yet refreshed after you added tags, I suppose, so you were not seeing your last changes ... It's this information Facebook uses when you share something.
Does it work now ?
Btw it gives this :