简体   繁体   中英

facebook like button liking wrong url

If I try and make a facebook like button to like the following url:

http://go-style.co.uk/nggallery/page-7029/image/35/

The button likes the url:

http://go-style.co.uk/test-gallery/

Does anyone know why this is happening? I have put it through the linter at:

http://developers.facebook.com/tools/linter

but it doesnt seem to help much.

This is driving me CRAZY! please help!

Here is a typical like button that I've been trying that won't work:

<iframe scrolling="no" frameborder="0" style="border: medium none; overflow: hidden; width: 80px; height: 21px;" allowtransparency="true" src="http://www.facebook.com/plugins/like.php?href=http://go-style.co.uk/nggallery/page-7029/image/34/&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=lucida+grande&amp;colorscheme=light"></iframe>

It was facebook caching problem in the end. Because it had cached the urls when I'd done them wrong, when I did them right it was displaying the old url.

您是否尝试使用此工具创建链接按钮?

Just adding that for best results with Facebook "Like" or "Share" buttons you should use the Open Graph meta tags in your page headers. Good docs on using are here: http://developers.facebook.com/docs/opengraph/

Example for your URL:

<meta property="og:url" content="http://go-style.co.uk/nggallery/page-7029/image/35/"/>   

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM