像Button og:图像和og:标题无法识别 [英] Like Button og: image and og:title not being recognised

查看:76
本文介绍了像Button og:图像和og:标题无法识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用赞"按钮时,定义的og:image和og:title不会显示在Facebook页面上.

示例链接.这是文章底部的喜欢"按钮,而不是页面顶部的喜欢"按钮:

单个数据库文章的动态数据是否可以,还是您会遇到Facebook缓存问题?

再次感谢您的帮助,非常感谢.

阿迪

解决方案

当您首次向页面添加喜欢"按钮时,Facebook会缓存数据.此缓存可能在区域内不确定,但是有时需要24小时才能删除缓存.因此,请为您喜欢的按钮标题制作一个可工作的模板,并一直使用它们,如果lint显示正常,那么它将正常.

(注意:尝试从 https://developers.facebook.com/tools/debug/这可能会解决它,只是一个迷信)

当我喜欢该帖子时,

显示此图像

http://www.nflfc.co.uk/images/news/221_154x85.jpg

以及个人资料上的此信息

NFLFC:森林女孩8 v 0 Wollat​​on Hall 沃尔拉顿(Wollat​​on)创造了第一个机会,使娜塔莉(Natalie)获得良好的扑救,但7分钟后,杰西卡·蒙(Jessica Munn)使森林(Forest)取得了临床领先.森林虽然没有流利,但却创造了其他机会,但是由于门将的疏忽导致莱亚·沃德(Leia Ward)增加了租球权.

When using the like button, the defined og:image and og:title do not show on facebook page.

Link to example .. It's the like button at bottom of the article and not the one at the top of the page: http://www.nflfc.co.uk/main.php?articleId=221&pageId=3&teamId=3

Using the linter I get the following info which all points to everything being ok but no joy...

http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.nflfc.co.uk%2Fmain.php%3FarticleId%3D221%26pageId%3D3%26teamId%3D3

Any help to point me in the right direction into what I am doing wrong will be much appreciated.

Adi


Thankyou for replying so quickly. I think you are correct in the facebook cache being regional, as I have just had an overseas friend test and it worked fine for him too.

I'm concerned how I am writing my code now though with this cache.....

<?php
$url="http://".$_SERVER['HTTP_HOST'].$SERVER['REQUEST_URI'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
<head>
<title>Nottingham Forest Ladies Football Club - <?php echo $row_pageLayoutSelection['linkTitle']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="og:title" content="NFLFC : <?php echo $row_article2['articleTitle']; ?>" />
<meta property="og:type" content="sports_team" />
<meta property="og:url" content="<?php echo $url; ?>" />
<meta property="og:image" content="http://www.nflfc.co.uk/images/news/<?php echo $row_article2['articleId']; ?>_154x85.jpg" />
<meta property="og:site_name" content="NFLFC : <?php echo $row_article2['articleTitle']; ?>" />
<meta property="fb:app_id" content="xxxxxxx"/>
<meta property="fb:admins" content="xxxxxxx" />

Will this dynamic data for individual database articles be ok or will I encounter Facebook cache issue do you think?

Thanks again for your help with this, greatly appreciated.

Adi

解决方案

Facebook caches data when you first add like button to your page. This caches might be regional not sure about that, but it takes 24hr to remove caches sometimes. So make a working template for your like button headers and use them all the time, if lint shows its ok then it ll be ok.

(Note:try to like the page from https://developers.facebook.com/tools/debug/ this might fix it, just a superstition)

when i liked the post,

shows this image

http://www.nflfc.co.uk/images/news/221_154x85.jpg

and this info on profile

NFLFC : Forest Girls 8 v 0 Wollaton Hall It was Wollaton who created the first chance causing Natalie to pull off a good save, but after 7 minutes Jessica Munn put Forest ahead with a clinical finish. Forest without being fluent created other opportunities, but it was a poor clearance by the keeper which led to Leia Ward increasing the lea...

这篇关于像Button og:图像和og:标题无法识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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