facebook debugger URL returned a bad HTTP response code - facebook

I've created a shop site for one my customer.
Facebook debugger send to me many errors:
Could Not Follow Redirect Path Using data from
http://www.yupeshop.it/IT/prodotto.php?id=84&label=Sciarpa+Stampa+con+fantasia+UK
because there was an error following the redirect path.
But there is no redirect. URL returned a bad HTTP response code.
But if I try to get the page with an online check I see 200 OK as answer, what's wrong?

In the OG meta tags, you have given
<meta property="og:url" content="http://www.yupeshop.it/prodotto.php?id=84" />
And that URL, which you are telling Facebook is the “real” URL to use for this object, currently only returns a 404 Not Found.
(I guess that is actually meant to be http://www.yupeshop.it/IT/prodotto.php?id=84 with the directory IT in it as well?)

Related

Nginx config for single page angularjs website to work with prerender.io for Facebook Open Graph

I have a single page angularjs web app. I'm trying enable it to be crawlable by search engines. To achieve this I'm using prerender.io, a nodejs webserver with a phantomjs browser to render ajax pages.
I am basing my nginx config off the following gist: https://gist.github.com/Stanback/6998085
This works for the most part. I can curl my app and get the correct response: curl -o test.html domain.com/?_escaped_fragment=/path
The request is redirected to the prerender.io proxy and the proxy makes a single request with the following url: domain.com/#!/path
All other requests (js, img, css and xhr) pass through nginx as normal. Phantomjs has no trouble rendering the proxy request after waiting for the following JS variable to be set to true: window.prerenderReady = false;
This is all great... Google can crawl my website! Enter Facebook.
I'm setting a number of OG metatags so that I can use the Facebook like button (iFrame). The following metatags are set for each page:
<link rel="canonical" href="http://domain.com/#!/asset">
<meta property="og:url" content="http://domain.com/#!/asset">
<meta property="og:type" content="website">
<meta property="og:image" content="http://domain.com/image.jpg">
<meta property="fb:app_id" content="xxx">
<meta property="og:description" content="foo">
<meta property="og:title" content="bar">
<meta property="og:site_name" content="domain.com">
These metatags are updated correctly by angularjs for each asset and the phantomyjs proxy correctly waits for them to be updated before returning the response.
However when I test the URL http://domain.com/#!/asset with the Facebook URL linter I get some problems.
Facebook claims that the canonical URL and the og:url differ, however when I click "See exactly what our scraper sees for your URL" they are idential
When I click "See exactly what our scraper sees for your URL" the canonical and og:url have been replaced with domain.com/?fb_locale=en_GB#!/asset
The proxy receives 3 requests. The first for the asset then it seems it follows the canonical and og:url
When a user clicks the Like this page iFrame the link back to my website looks like domain.com/?_escaped_fragment_=/asset
Number 4 is the issue that is a deal breaker. If a user likes a page on my post it goes into their Facebook activity stream. If that user then clicks on the link back to my site in their stream it will direct them through the proxy and render the page through phantomjs!
I'm guessing that I shouldn't be sharing the links with the hash-bang through Facebook. I think I should be sharing a link and setting the canonical / og:url to something like domain.com/static/asset. The nginx config should be updated to catch /static urls, if useragent = Facebook or params contain _escaped_fragment_ then direct to proxy else redirect the user to #!/asset.
I have tired all that I can think to get a modified nginx config to work with this however it has beaten me. When I intercept those /static urls and rewrite to the proxy randomly image, css and js assets are requested through the proxy and phantomjs crashes.
Could someone please help me modify this nginx config so that I can forward web crawler requests to the proxy, allow facebook to scrape the correct og tags off my site AND have the correct link-back url specified when users share my content on Facebook?
Did you figure this out yet? Facebook doesn't do a very good job with #! urls. This StackOverflow answer does a good job explaining it: How to handle facebook sharing/like with hashbang urls?
When a user is on a page on your site (http://domain.com/#!/asset) and does a sharing action on your website, it should share the canonical url http://domain.com/asset.
Then if a user visits http://domain.com/asset, you just redirect them to http://domain.com/#!/asset.
And if Facebook accesses the canonical URL (http://domain.com/asset), then redirect it to your Prerender.io server.
Or...just switch from #! to html5 pushstate, and you won't have to do any of the #! redirecting for Facebook. That way the proxy becomes more simple, so you'd always just proxy any request from Facebook to your Prerender.io server

Critical Error Linting URL: An internal error occurred while linting the URL

I tried to create a post (using a blogger URL) in the Facebook Power Editor.
Result:
Error creating posts. Please retry later. You can also go to your Page and post from there. (OAuthException) (#1500) The url you supplied is invalid
Then tried to install Facebook's Open Graph tags into Blogger to see of that would fix the problem.
To test the OG tags I used Open Graph Object Debugger.
Here are the results:
Critical Errors That Must Be Fixed, Error Linting URL, An internal error occurred while linting the URL.
How do I fix the invalid URL and the Critical: Error Linting URL?
I am not tech savy so this issue is way over my head but I would like to get it fixed. Please help.
Thanks
I had a problem like this with the og:image pointing to an image hosted on Rackspace. The URL was something crazy like
http://1234567890abcdef1234-1234567890abcdef123456780123412b.r23.cf5.rackcdn.com
I think the Facebook linter was seeing this as spam, because if I actually embedded the image in my app/assets it worked fine, so it wasn't the image that was the problem.
The solution was to set up a CNAME on my hosting provider that pointed to the hideously long Rackspace URL, e.g.
CNAME Value
images http://1234567890abcdef1234-1234567890abcdef123456780123412b.r23.cf5.rackcdn.com
Then I changed the og:image meta tag to be
meta property="og:image" content="http://images.mydomain.com/relative_rackspace_imagepath.jpg"
I wanted to contribute a little data point here as this is currently the top google result for this error and there is little useful info out there.
In my case, the page was a post on a wordpress blog that happened to begin with a twitter post embed, and the twitter post happened to contain an url. My og tag plugin grabbed the embed and managed to place the url along with a little other cruft in og:description, and once I cleaned that up manually the error disappeared.
I think the lesson is that when this happens take a look at your og tags for the page for ANYTHING unusual. That's the place to start.
Happened to me once my og:image pointed to this url:
http://xxxxxxx.appspot.com.storage.googleapis.com/IsraelFlag.jpg
I just changed it to:
http://storage.googleapis.com/xxxxxxx.appspot.com/IsraelFlag.jpg
and it works
probably very poor software parses the html
I spent hours trying to debug why this was happening for our site. It turns out it was because of the og:locale:alternate meta tags we had.
<meta property="og:locale:alternate" content="cs_CZ" />
<meta property="og:locale:alternate" content="de_DE" />
...
When Facebook sees this in your tags they subsequently hit your og:url with '?fb_locale=[lang]' where [lang] is each of your alternates. There is one request per alternate. In our case, we had code that was returning back a 302 on that request. As a result, the Facebook Open Graph Object Debugger kept saying "Error parsing input URL"
Once I fixed the responses to the alternate requests to actually return internationalized content, the issue was fixed.

Facebook debugger response code 302

looks like that facebook scraper cant detect my page, it says that the
response code is : 302
and when I click to see what scraper sees from my URL link, it says:
Document returned no data
I already have all the og meta tags along canonical URL link working fine, I guess it must be some redirection issue since the response code indicate it. it's the same error on my homepage and other pages.
because of this, I cant share any content of my website via sharing a URL on facebook.
I'd appreciate any help, thanks.

Why am I getthing a Response Code: 200 when I put in all of the <meta og: in properly

Here is what I get when I us the facebook debugger:
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.towertheatermiami.com%2FTeventDetails.aspx%3FSeriesId%3D8874
Response Code: 200
Fetched URL: http://www.towertheatermiami.com/TeventDetails.aspx?SeriesId=8874
I realize that this page is not posting to facebook properly when recommending or writing a comment. The image and content doesn't come in at all under my facebook profile.
Response code 200 means that Facebook was able to scrape your page.
The problem that I am seeing with your URL is that it returns a 404 error and you redirect to a custom 404. Facebook is scraping the tags from your custom error page.

Facebook debug tool giving Bad Response Code (redirect) for my site

Today, I tried to post a link from my website on my wall, but no OG meta information was fetched. Therefore, I went on to Facebook URL Linter to check things for myself and see if OG meta tags are fetched properly.
To my surprise, every link on my website including the domain itself, generated Response code: 302.
My OG tags are well set and they were working fine a few days ago. Following is what the debugger shows for my domain : http://www.price-tag.org
Response Code: 302
Fetched URL: http://price-tag.org/
Canonical URL: http://price-tag.org/
Final URL: http://price-tag.org/WpjZW/
For every page from my website, facebook linter is adding an arbitrary string like above WpjZW.
Please let me know if this is a facebook error or something has gone wrong at my end.
It seems the linter is being sent on a circular redirect loop. It is seeing a 302 redirect.
For http://www.price-tag.org I don't see anything but a 200 response code when I navigate to your website using Firefox.
However, if I remove the www from the url and go to http://price-tag.org, I do see the strange behaviour of the 302s and then a random url like http://price-tag.org/UKXRN/
I would suggest you contact your server admin or web master to see what they have in place that is doing this 302 redirect and strange url characters.