开发者

Facebook like button ignoring path

I have a ASP.NET MVC3 site, let's say http://www.example.com. I've set up an app in facebook for this site, and am using, at minimum, the 6 required open graph tags in my page header. The og:url tag is customized for each page as necessary, like so:

<meta property="og:url" content="@(ViewBag.FacebookUrl ?? Request.Url.AbsoluteUri)"/>

I'm also including the iframe version of the facebook like button, using a customized href value in the query parameter for the like.php page, like so:

<iframe src="http://www.facebook.com/plugins/like.php?href=@(Url.Encode(ViewBag.FacebookUrl ?? Request.Url.AbsoluteUri))&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>

The web site URL in my facebook app's configuration is set to:

http://www.example.com/

Whenever I include a like button on a specific page, it posts back to the user's facebook wall using the root of the web site (http://www.example.com/) and completely ignores any path or query information. Additionally the counter that tracks the number of likes also seems to be globally ignoring the path (the number is the same across all pages). It does appear to be picking up the page 开发者_高级运维title and description from the open graph tags.

What gives? Am I missing something?


Check on https://developers.facebook.com/tools/lint how facebook sees your page. Also be aware that facebook caches your page: but lint will enter the the new version ofthe page into their cache.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜