Facebook like button, site name is not clickable on Facebook page
I'm using the Facebook like button, and开发者_StackOverflow while my like'd URL shows up correctly on the site and is clickable, the site URL after the 'on' isn't clickable.
Example on Facebook: (bold is clickable)
Philip likes Fun & Fresh: Cafe Gitane on www.example.com. · Comment · Like
However, the 'example.com' is supposed to be clickable as well. I have seen other sites (like theonion.com) do it. How can I do it?
Here are my meta tags:
<meta property="og:title" content="<?=$title?>"/>
<meta property="og:type" content="article"/>
<meta property="og:site_name" content="www.example.com"/>
<meta property="og:image" content="http://www.example.com/images/example-bw.jpg"/>
<meta property="fb:admins" content="example"/>
<?
if ($_GET[fb]=="g" ){echo"<meta property=\"og:url\" content=\"www.example.com%2Fgoingout.php%3Ffid%3D$fid&fb=g\"/>";
?>
The URL linter is getting all of the information above. However it's not displaying a 'site URL' property.
I have tried writing the og:site name as http://www, www,
, whatever. Nothing makes it clickable.
Here's a weird twist: if I enter the og:site_name as example.com then the og:site name displays like that (it shows up on Facebook with visible <a></a>
tags around it), but it's clickable AND there's a separate property shown in the linter as 'site URL' which doesn't otherwise display. I'm confused.
og:site_name is supposed to be the "name" of the site, not the url. If you enter Example as the site name the link will work. What you are experiencing is either the way facebook intended it or a bug. Either are likely. I know that if you use text not in url format the link will appear, but you might also want to try just not including the og:site_name tag. The default behavior I think is to just display the site domain name if no site_name is found.
精彩评论