FB_Graph: An error occurred. Please try again later - ruby-on-rails

I am using fb_graph for my rails app.
I just followed nov/fb_graph app.
It was working fine till last week, i was able yo login and could get user information.
But suddenly i am getting error.
I didnt change anything in my app.
my app_id, screat_id everything is correct.
Even i am getting error when i close that facebook error window like
Graph::Auth::VerificationFailed
Facebook cookie not found
Could any one got through this error

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.
thank you

Related

ASP.NET OWIN Login with Microsoft Live ID - Invalid request and Google Redirect Url Mismatch

I have a site published on Azure, the social auth work correctly on every device an pc, except for one user whom keeps receiving the error invalid request, every time he tries to login using Microsoft.
I was thinking that the reason were that he is blocking cookies, but I tried this and did not get the same error.
He tries to access my site from IE and Chrome, and still gets the same error on every social network. But for everyone else this works just fine.
Someone knows what could be the reason of this error?
Here it is some captures about the URL received and the error page on Windows Live and Google:
Google URL error: https://accounts.google.com/o/oauth2/auth?scope=openid+profile+email&response_type=code&redirect_uri=https://wtm.azurewebsites.net/signin-google&state=xuugnYO6064L0MSO643UyrcDcDvZm_sqndpnUUR_Bn3e3lQkmtFTCq1ZrfMluCbMZhoIEX9G8Vrp-RxNwFHUyxvx_4mpoJVJZnR-n0LFDJyPazQ0ujUsQ6Jl2EIStNS0_EsnZOIZtIJySlgFrIr_TzjNBoih1APWLnGaLBb6wPaLuXQktAeTHeeUBTTnN9HWXi2WtPCYx08wX0N87XJa1kkk-mMcp-ro5UD5oO1EIE4&client_id=950525637185-3f4qu6vhoemqps16mk88mrcf49tn7hvo.apps.googleusercontent.com&hl=es-419&from_login=1&as=-6673ad9c11de7b4d
Microsoft Live URL error: https://login.live.com/err.srf?lc=5130#error=invalid_request&error_description=The%20provided%20value%20for%20the%20input%20parameter%20'redirect_uri'%20is%20not%20valid.%20The%20expected%20value%20is%20'https://login.live.com/oauth20_desktop.srf'%20or%20a%20URL%20which%20matches%20the%20redirect%20URI%20registered%20for%20this%20client%20application.&state=kZj77bUrMjKBFKTwBTVl_p7zkjcqWqBAe95pW-eQFanQaLWx9vHUpR5duFFcstJF4MKEUvBe_pymDNNc896dGPFDwNSP1-lQrsr0GYgtu2QtRJ6bdfQO4H0lCatbvW5yOs5DwD6_ItRL2irc6qitL03FkDEkiFUZYLAzhsUP6FjaEosTKGsnBXV0HljrRECl7RN2cuiuJWWJQJcxAUznC2Rj6zx76zkF-FNMHgFbvwM
I fixed the problem, he was using https instead of http, that were how the redirect URL were registered, I added this other URL redirection and now it works fine.
Thank you for your help!

Dropbox throws "Invalid redirect_uri" error, although exactly the same url is specified in the app

I want to start my Dropbox-app by linking to a dropbox account as specified here:
https://www.dropbox.com/developers/datastore/tutorial/js
However, dropbox won't redirect back to my website and throws "Invalid redirect_uri"
I specified various redirect urls and double checked my app_key, but i could not get it to work. What am i doing wrong?
Thanks in advance!
When I had this issue, I realized that when refreshing the dropbox app console page, it hadn't saved my domain value. Apparently, ONLY HTTPS prefixed domains will work. When I added https it worked fine and saved my value, then I was able to get that to work with my javascript, but I was wishing that I didn't have to setup a server with a cert just to test. Security security, I guess.
http://blah.com // didn't work
https://blah.com // did work
Make sure the full, exact URL is registered as a redirect URI. (E.g. https://www.mydomain.com/mypage.html) The error message in the browser should tell you the exact URI that was attempted, so you should be able to match it perfectly.
I am brand new on this and ran into the same issue today attempting to follow the "Dropbox Datastores and Drop-Ins" tutorial on net.tutsplus.com
My setup is on a local system as well with the solution in a sub directory called "todo".
By trial and error, I got through to the authorisation screen by adding this URI in the Dropbox Developer Console: "http://LH.LH/todo/" (without quotes, AND because of comment restrictions on this board, please replace "LH.LH" with "localhost")
Btw I can see in the console, that there are some other issues with the code, but I will be looking into that.
I'm facing the same issue. It works fine locally, but not on production. I find it to be because of the redirection URI: it adds the 'http://' bit, while you can't add this to the list of supported URI in the Dropbox app list.
Try changing the url manually from the browser, removing the http:// and leaving only the domain. Does it work? If so, you have the same problem as I do... which I still don't know how to fix :(

Facebook iFrame is pulling rails dynamic pages as 404 errors

I have a Facebook app page and a rails application. My rails application loads a dynamic page based on a key that is given. This works fine and dandy outside of my facebook app:
https://app.eventsent.net/event_lists/3d40ba2a4a10947c17c2337fba3421dd406cceb5?frame=true
However inside of Facebook the page is pulling up as a 404 error:
https://www.facebook.com/reynoldsdesignstudio/app_419134091467471
I have gotten around this issue by creating a static file within my system to be able to have facebook view it however this is not ideal as deploying the rails app with updates makes modifying these static pages a pain.
Any help on this would be great.
We got this figured out by changing the routes file to allow for a post request instead of just a get request
Your problem is not related to dynamic/static content. Also Facebook is showing a 501 error, not a 404. In short, your SSL cert is not valid for the staging.app subdomain you are pointing your Facebook page at.
Visiting your Facebook page (https://www.facebook.com/reynoldsdesignstudio/app_419134091467471) yields this error:
This webpage is not available
The webpage at https://staging.app.eventsent.net/event_lists/3d40ba2a4a10947c17c2337fba3421dd406cceb5.html might be temporarily down or it may have moved permanently to a new web address.
Error 501 (net::ERR_INSECURE_RESPONSE): Unknown error.
Note that the subdomain is staging.app. If you happen to be using Firefox, you get a nice error message the spells everything out:
This Connection is Untrusted
You have asked Firefox to connect securely to staging.app.eventsent.net, but we can't confirm that your connection is secure.
staging.app.eventsent.net uses an invalid security certificate.
The certificate is only valid for the following names:
app.eventsent.net , www.app.eventsent.net
(Error code: ssl_error_bad_cert_domain)
The easiest solution would be to get a WildCard SSL certificate that is valid for *.eventsent.net.
FYI, if you visit https://staging.app.eventsent.net/event_lists/3d40ba2a4a10947c17c2337fba3421dd406cceb5?frame=true, you will get a rather dire-looking warning from your browser. If you ignore the warning and tell the browser to accept the certificate, your Facebook page will then load fine in the same browser.

Facebook app - login through omniauth - OAuthException 191

I am facing with the problem:
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
I set up in my app the needed keys and tokens, in the Facebook's dev center I set up Site URL: to http://127.0.0.1:3001 and I am getting the error above. Also I tried to set up App Namespace: to http://127.0.0.1:3001, but I am getting error about bad address format...
When I tried to fill out he App Domain: and set there my localhost, again the error for the bad format...
What is the correct configuration the fabebook app with localhost?
You need to use urls, what I would do add this to your hosts:
127.0.0.1 dev-machine
127.0.0.1 dev-machine.com
Then in the facebook settings use
dev-machine.com as your App Domain
dev-machine.com:3001 as your Site URL
Yes in FB App you have to assign an IP Site/ App Domain.
Facebook matches this url with the url of the request where it came from.
You can not assign localhost or 127.0.0.1
You have to enter the IP address your server. Also if it is rails then call the site with your-ip:3000 instead of localhost:3000; I use 192.168.1.154:3000
Enter the same IP address in IP of the site and APP Domain in your FB APP Settings.
To get your IP run ifconfig command in terminal if it is Linux or ipconfig if windows.
let me know if it doesn't work.
in the facebook App Page -> the basic tab. find "Website with Facebook Login" Option.
you will find Site URL: input there put the full URL (i.e http:// localhost:3000 if you are in Development mode) [* note : not "App Domains"]
I encountered this error and it was incredibly frustrating. The solution? I wasn't actually passing parameters properly in the query string. When I manually built my URL and submitted it using the browser, everything worked fine. Crap.
So, essentially, if you're getting this error it may actually be a symptom of something totally unrelated to the redirect_uri -- it just happens to be the first error triggered when your parameters are messed up. I hope that saves you the hours I spent on this.

Facebook login on iPhone thowing errors

I have seen several past questions in SO, but none of them see to answer the question.
I am trying to have my iphone webapp use the Facebook login, but it fails everytime with a 191 error:
An error occurred with My Dev app. Please try again later.
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.
My FB logging link looks like such:
http://m.facebook.com/dialog/oauth/?scope=email,user_birthday&client_id=1754645158****&redirect_uri=http://dev.someDomain.com&display=touch
Post trying to following the link the return uri is stripped from the url:
http://m.facebook.com/dialog/oauth/?scope=email,user_birthday&client_id=1754645158*****&redirect_uri=&display=touch
Per the fb dev site when specifying the domain:
If set, Facebook will enable authentication on all subdomains (e.g., "example.com" will enable *.example.com)
when I change it to my main domain, it redirects correctly.
What gives?
So I think I figured it out, adding www:
redirect_uri=http://www.dev.some
instead of:
redirect_uri=http://dev.some
Seems to fix this, now to finish the rest of the login...

Resources