简体   繁体   中英

Facebook like not liking the proper page

I have used the <iframe> like button of facebook to like my page, but the problem i'm facing here is that the like.php page of facebook ignores a part of my query string. For eg:

<iframe src="//www.facebook.com/plugins/like.php?href=http://stg.radioworld.com/default.aspx?tabid=75&amp;entryid=10220&amp;width=450&amp;height=21&amp;colorscheme=light&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;send=false&amp;appId=235245186502970" scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 93px; height: 28px; vertical-align: middle;" allowtransparency="true"></iframe>

Here, like.php ignores the entryid query string and always like http://stg.radioworld.com/default.aspx?tabid=75 . Please help.

I believe the issue is that the entire URL is not encoded. Since you are using .NET, you should be able to use UrlEncode to correctly encode the entire parameter.

From the looks of it, your ? and : in your sub URL are possibly causing issues.

Your URL should probably look something like this:

"...like.php?href=http%3A//stg.radioworld.com/default.aspx%3Ftabid=75&amp;entryid=10220..."

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