Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
715 views
in Technique[技术] by (71.8m points)

facebook share link returning 404 redirect error when page exists

Sharing the following link in facebook is returning 404 error page information instead of the page details and link even though the page exists:

http://www.kentbusinessangel.co.uk/lucky-achieve-goals?sq=be-excited&src=fb

To try and fix the error:

  • I tried encoding the link to enable passing the & and ? correctly (didn't work)
  • I created a redirect from http://www.kentbusinessangel.co.uk/lucky-achieve-goals-be-excited/src-fb to the original url (which works when you use the url in the browser, but still only shows 404 error when sharing on facebook)
  • I created a static page at http://www.kentbusinessangel.co.uk/lucky-achieve-goal/fb/be-excited (again this page works in the browser but facebook says error 404 for this page too!)
  • I waited a day hoping that maybe facebook needed time to scrape the page again (he same problem continues)
  • I added metatags to the new static page and made the canonical match the url for this page just in case it would help (but it still shows 404 redirect error sharing on facebook):
<meta property="og:title" content="13 Lucky Steps to Achieve Your Goals - Be Excited">
<meta property="og:description" content="Get 13 lucky steps to achieve your goals! - Be Excited">
<meta property="og:image" content="../../images/numbers/circles/one.png">
<link rel="canonical" href="http://www.kentbusinessangel.co.uk/lucky-achieve-goal/fb/be-excited">

Does anyone have a clue why the facebook share information is being taken from my 404 error page instead of the url being shared and how I can fix it?

Edit: After posting this question the original link http://www.kentbusinessangel.co.uk/lucky-achieve-goals?sq=be-excited&src=fb worked on the facebook share! --- However, the other pages that are all set up through the same dynamic page are still not working and neither are the other work around links that I created in the steps above

i.e. http://www.kentbusinessangel.co.uk/lucky-achieve-goals?sq=effort&src=fb

Edit2: Would have been nice if posting the second link on here would have magically made that work through the facebook share too - but no joy - *confused*

Any help on this would be appreciated

Edit 3: Ok, the original link is back to not working on the share area as well as the other links - so back to square one -

Fix!! Seems that facebook scraped the pages when there was a redirect error and since then hadn't rescraped them.
Putting them into the delinter: developers.facebook.com/tools/debug rescraped the page and retrieved the correct information! After doing this new share links for these pages worked too! (so simple :s )

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

its simple

add the below meta code in Edit html place in blogger before <b:skin><![CDATA[/*

change the content what you want to be

goto https://developers.facebook.com/tools/debug/og/object/

past the link of blog there and scrap it

<meta content='TestedCodes' property='og:title'/> <meta content='Introducing Important basic codes which a programmer needs to know ' property='og:description'/> <meta content='http://www.testedcodes.net' property='og:url'/> <meta content='https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSN90lduXisEbSyVbU4SHa-vcRjQeSZZH7d8kY7AkX3L-f56dFhFw' property='og:image'/>


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...