Facebook sharer: Object moved/302 error

白昼怎懂夜的黑 提交于 2019-12-24 03:35:09

问题


I get a ̀Object moved message when sharing URLs from my site on facebook. Facebook debugger tells me that he sees an http response 302 he can't follow:

URL requested a HTTP redirect, but it could not be followed.

But in the browser I get a 200 for the same URL.

When I try to rescrape, I get the following error:

Error parsing input URL, no data was cached, or no data was scraped.

This question has been asked quite a few times, but I've not come accross an answer. The website runs with sitecore/IIS and is available via HTTP only (no HTTPS, if that's relevant).


回答1:


I had a simillar issue with the server configuration and it's redirection 301 & 302, I'm not sure what's your problem exactly but maybe try this website to figure it out, make sure to check both with WWW and without it.

one must be a permanent 301 redirect, and the other one must be a direct link, for instance without WWW must be redirected to WWW, and the WWW one shouldn't be redirected at all.




回答2:


The problem was as obvious as described in the question: We had special code in our site that caused redirects for some clients (non-germans), so our browser got a 200 and Facebook a 302.

For anyone stumbling upon this question and looking for help, the best answer I found after a long search (not top on google) was given to the following question:

Facebook won't share a link to my site



来源:https://stackoverflow.com/questions/27824651/facebook-sharer-object-moved-302-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!