Search code examples
facebook-likefacebook-likebox

Facebook Like not appearing , if Url has "/" "%2F" in end


Our website url is ending with slash "/", it get encoded to "%2F". because of this slash facebook like button is not showing on the website.

Eg

Not working url: because in href parameter url has "%2F", but if i remove the "%2f", it starts working. Earlier it was working fine.

https://www.facebook.com/plugins/like.php?action=like&channel_url=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D9%23cb%3Df3e1268db4%26origin%3Dhttps%253A%252F%252Fwww.bcgperspectives.com%252Ff189b4c84c%26domain%3Dwww.bcgperspectives.com%26relation%3Dparent.parent&extended_social_context=false&font=arial&href=https%3A%2F%2Fwww.bcgperspectives.com%2Fcontent%2Fvideos%2Fleadership_paul_deighton_organizing_london_2012_olympics%2F&layout=button_count&locale=en_US&node_type=link&ref=.UCfPf5lBPRI.like&sdk=joey&show_faces=false&width=90

any solution for it.


Solution

  • I can’t get a like button shown on https://developers.facebook.com/docs/reference/plugins/like/ when I input your URL https://www.bcgperspectives.com/content/videos/leadership_paul_deighton_organizing_london_2012_olympics/, no matter whether the trailing slash is there or not.

    However, it does get shown if I use http:// instead of https:// in front of your URL – then it works for both versions, the one with the trailing slash and the one without.

    An interesting fact though is, that I can not see any information scraped from your page using the debug tool on your URL – doesn’t matter if its the slash or no-slash version or the HTTP vs the HTTPS version, since your server redirects to the HTTPS version with the trailing slash anyway. So that might point to some problem FB’s scraper has with your URL/domain (although no explicit error messages are shown).