开发者

facebook like: liking a page that redirects via 301 or 302 throws error "page could not be reached"

开发者 https://www.devze.com 2023-01-11 16:15 出处:网络
since a couple of days the Like-Button on our site is not working anymore. When I press the like button it shows \"error: The page at *** could not be reached.\". When I remove the redirect it works,

since a couple of days the Like-Button on our site is not working anymore. When I press the like button it shows "error: The page at *** could not be reached.". When I remove the redirect it works, but I don't want to remove it because doing so the URL to like will be changed and I loose all "likes" that were connected with the old URL.

I am using a basic XFBML setup with the markup:

<fb:like show_faces="false" lay开发者_Go百科out="box" width="210px" href="http://url-that-redirects-via-301"></fb:like>

Can't find anyone with the same problem on Google neither any statement from Facebook that they don't support redirects anymore. Anyone can help?


My guess is that Facebook will only allow the page to be "liked" if it returns HTTP status code 200. This is likely to protect against misleading or fake likes.

Imagine if you saw that a friend liked a page with the title "Kittens are Cute". You think to yourself "Kittens are cute!", and go to that page. The page then redirects you to "Puppies are Cuter than Kittens!". That would be misleading, and likely the kind of thing that Facebook would want to avoid.

0

精彩评论

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