Could Not Follow Redirect Path - facebook

I was debugging open graph for my new website and I have the following error:
Could Not Follow Redirect Path
and
URL returned a bad HTTP response code.
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.webcilento.com%2Fsite%2Feventi%2Ffiera-di-prova.html
This error occurs only in calendar section (http://www.webcilento.com/site/eventi/fiera-di-prova.html)
I'm using Joomla 3.2.1
Any ideas?

I think there is an error in the og:url open graph header which you have set.
The URL to your page is http://www.webcilento.com/site/eventi/fiera-di-prova.html but the open graph header says this:
<meta property="og:url" content="http://www.webcilento.com/site/site/eventi/fiera-di-prova.html" />
There is an extra "site/" part in that URL - Facebook is picking this up, visiting that URL which then returns a 404 - hence the "bad HTTP response code" message. If you change that <meta> to the following, it should work:
<meta property="og:url" content="http://www.webcilento.com/site/eventi/fiera-di-prova.html" />
If these headers are added by a plugin or by Joomla itself, then perhaps something is misconfigured? If you provide more information about how you are adding the Open graph headers to the page then we can assist with that.

What acute view! I haven't seen the double 'site' in the url!
Anyway the tag is added by a calendar plugin.
This is the code
// adding current url as url
if (isset($_SERVER['HTTPS'])) {
$protocol = "https://";
} else {
$protocol = "http://";
}
$fburl = $protocol.$_SERVER['HTTP_HOST'].KRequest::root().#route('option=com_ohanah&view=event&id='.$event->id.$itemid);
$doc->addCustomTag( '<meta property="og:url" content="'.$fburl.'" />');
I'll try to debug that variables.

After digging for 3 days came to the conclusion that name servers were configured incorrectly.
I am using Bigrock for the domain and GoDaddy for hosting, by mistake, I configured actual hosting provider host name in "Name Server 3" and "Name Server 4". But Facebook looks for the content in first server "bigrocks-1.com"(wrong server) server but does not find any hosting. Bigrock redirects request to next server "bigrocks-2.com", for which Facebook results into 'Using data from "URL" because there was an error following the redirect path.'.
Hope it may help you :)

Related

Mailchimp No Host Exception when Subscribing Email to A List

I'm trying to send a subscription call, but got an error saying the the URL is invalid.
This is the URL I used:
https://us14.api.mailchimp.com/3.0/lists/<list-id>/members/
then I get this back in the response:
<HTML>
<HEAD>
<TITLE>Invalid URL</TITLE>
</HEAD>
<BODY>
<H1>Invalid URL</H1>
The requested URL "http://%5bNo%20Host%5d/3.0/lists/41e44e1bde/members/", is invalid.
<p>
Reference #9.cc6a1db8.1483891456.16189371
</BODY>
</HTML>
which translates to:
http://[No Host]/3.0/lists/<list-id>/members/
us14 is definitely the right data center according to the documentation so I'm not quite sure what's wrong.
It turned out that if you set HTTP header field "Host" in the request, it will always return this error. I tested this out by removing every fields one-by-one and this was the only one that caused an issue.
Many environments use the Host header for stuff like virtual sites where you are running more than one website behind the same IP Address (i.e. api.mailchimp.com and www.mailchimp.com could be on the same server) It is definitly possible for an error to be received if you set an invalid host since their proxies can't route it correctly. Normally, the host header is set automatically by the browser or HTTP client and usually not something you would override.
Are you still having trouble? If so, would be useful to see a screenshot of something like PostMan or https://ApiRequest.IO to see what your inputs are.

Facebook privacy policy URL: Bad Response Code: URL returned a bad HTTP response code

I want to publish my first Facebook application and a Privacy Policy URL is required.
I have the page privacypolicy.html published in my website but I get the next message when I configure it in "App Details":
You must submit a valid Privacy Policy URL in order to be compliant with Facebook Platform. Request failed with error:
Bad Response Code: URL returned a bad HTTP response code.
The http code returned when I request the page is 200
Any ideas?
The URL is cached by facebook.
Adding # at the end of my Url did the job ..
This is an old question I know, but I figured I'd post my solution and hope it helps anyone. For me I got this error because I had rewrite rules that didn't catch the URL that Facebook actually goes to in order to get the privacy policy. Facebook adds a query string to the URL that you give it for the privacy policy and since my privacy policy page doesn't do anything with the query string, I didn't check for it in my rewrite rule.
You can check out how Facebook scrapes the page you give it by going to Facebook's Sharing Debugger and putting your URL in the input bar. You can also see the last time that Facebook tried to scrape that URL and tell Facebook to try again once you've fixed any issues. This will get around the caching that was mentioned in user2390340's post.
Facebook externalhit appears to request via the ipv6 address published in DNS if there is one available and won't check on the ipv4 published in DNS.
If your website doesn't have ipv6 enabled it'll return a 404 or 500 and you'll get that error "Bad Response Code: URL returned a bad HTTP response code" for your Privacy Policy URL.
Edit:
Also noted that Facebook caches the URL, I was checking it and getting a "bad response code" error even though there was no hit from their UA in the access logs.
Adding ?stuff onto the end of the URL in the Privacy Policy field bypassed a cache and the access log hits showed up with 200 OK, allowing the URL to be saved.
Not sure if this is related to user2259887's comment about Facebook using IPV6 DNS. But after reading his comment, I was able to work around the validation issue by specifying an IP Address URL instead of using the host domain name URL.
This workaround will not work well if the site IP address is dynamic or change often.

url requested redirect but the

When I pass the url by the Facebook debugger I receive the "Critical error"
"URL requested a HTTP redirect, but it could not be followed."
The redirected URL is the same as the Fetched and Canonical with the added "?AspxAutoDetectCookieSupport=1". So the link rejects this .
I tried the cookieless = UseCookies at Web.config in order to avoid the cookiesupport parameter in the URL but nothing happens , is still there.
this is the section in web.config :
<sessionState cookieless="UseCookies"/>
Is this fine?
Another way for suppressing the parameter?
Its a Facebook cache issue?
You can try it :
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fdisaweb.com%2FModulos%2Ftorre-noria-11.aspx
Thanks in Advance
You're link redirects to:
http://disaweb.com/modulos/torre-noria-11.aspx/?AspxAutoDetectCookieSupport=1
but that returns a 302 to the same location. You can't return a 301 or a 302 to the exact same location that is requested.

Facebook desktop app (on browser) - login without hosting on a webserver

I am trying to develop a Facebook desktop app that runs on a browser (but not on a webserver). So strictly speaking, I am running a standalone webpage that is not in any domain. I am in need to find a suitable login solution for this.
Currently, Facebook authentication has to be redirected to another URI - the problem for me is that I am unable to get the access token from this redirected page (dialog/poup) because of cross-domain access issues. Is there a way across it?
Also, since I am running the page on a filepath (c:/wamp/www/facebook.html) rather than on a webserver, the "auth.login" events are not fired after authentication is done in the dialog. Is this expected behaviour as well?
Any help would be appreciated. Thanks!
Read up on FB Auth: http://developers.facebook.com/docs/authentication/
If your app is able to read iframe URLs (such as an AIR based app) then you can rely on using the Desktop App Auth Flow and reading the credentials from the response URL that Facebook hosts: https://www.facebook.com/connect/login_success.html#access_token=...
Use local web server and server it from http://localhost... There is planty of lightweight one for Windows (Abyss) as well as Unix (thttpd).
EDIT: It seems it is not possible using file:// urls. I tried this page:
<html>
<head>
<script>
function fbLogin() {
if (window.location.hash) {
alert("Access token is: "+window.location.hash);
} else {
window.location.href = "https://www.facebook.com/dialog/oauth?"
+ "client_id=54715426813&redirect_uri=file:///D:/Herby/Desktop/page.html&response_type=token";
}
}
</script>
</head>
<body onLoad="fbLogin();">
</body>
</html>
and oath dialog said
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not permitted by the application configuration.
which means, you must fill in the file:/// type url in you app config. I tried that, but it said me the protocol used must be http or https. So, bye-bye to facebook on file://
The only possibility for true desktop apps is to include web control that uses true http urls and somehow (through tiny embedded server or by some kind of hook and mocking) is able to use such an URL (or, as was pointed in other answer, you can use no redirection url and get redirected to default facebook result page). But that is not something you can do in a browser only.

Facebook API error code 191 [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Facebook API error 191
I'm developing a Facebook app. When I attempt to get an access token, I get the following message:
An error occurred with test. Please try again later.
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.
https://developers.facebook.com/apps/.../summary
I've configured the app's domain (appsdot.xxx.com), name and other attributes.
What is causing this error, and how do I fix it?
The redirect_uri must contain the Site URL or Canvas URL as defined in your App Settings. I always get this error when I set a redirect_uri that doesn't contain the URLs in App Settings.
I got this error because I had a trailing slash on my Canvas URL and neglected to include the trailing slash in the redirect_uri.
be carefull error is about uri (i spell: Uniform Romeo India) and the most probably you are using word url (i spell: Uniform Romeo Lima) ... do you see the difference???
just add st like this:
redirect_uri: 'YOUR_PAGE_TAB_URL OR CANVAS_URL'
how simple,isnt it?
this just because of URL mistake
whatever website url is specified should be correct.
i mentioned website url as http://localhost:3000/ and domain as localhost
but in my browser i was running http://0.0.0.0:3000/ that was the actual problem so i ran server as localhost:3000 now its working fine. Because we mentioned site url as localhost fb will redirect to same, if we r running 0.0.0.0:3000 it will rise error that Given URL is not allowed by the Application configuration.
so becarefull with your website url you have specified in facebook app.
and the url you are running locally both should match
thank you
In my case, the problem was happening because I didn't configure the site domain in the right way.
You can access your site model by the admin and change the domain name from example.com to the real domain that you are using.
The best way to fix this is create a fixture; something like:
YOUR_APP/initial_data.json:
[{"pk": 1, "model": "sites.site", "fields":
{"domain": "127.0.0.1:8000", "name": "127.0.0.1:8000"}
}]
Make sure your domain is not being masked.
The base_url must contain the Site URL or Canvas URL as defined in your App Settings. I always get this error when I set a redirect_url that doesn't contain the URLs in App Settings.
You do have to register/create the url with facebook, by creating a facebook app. You might have to give the mobile phone number to them. The Site url you put in there needs to passed as the redirect url.
rails#{This error is related to URL}
-I just put the ip address in all the URL instead of localhost..now it's working file before doing that I tried so many things but didn't work..I am sure this one will work..