I am trying to integrate Facebook log in on my mvc3 website but, whenever I click on the login button it comes up with this:
An error occurred. Please try later
I am following this tutorial
The log in link generated is this:
https://www.facebook.com/dialog/oauth?api_key=%7B106425032813017%7D&app_id=%7B106425032813017%7D&client_id=%7B106425032813017%7D&display=popup&domain=localhost&locale=en_US&origin=1&redirect_uri=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df1fc578f9%26origin%3Dhttp%253A%252F%252Flocalhost%253A14567%252Ff1e7b8471%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df40e3fefc&response_type=token%2Csigned_request&sdk=joey
I have tried other tutorials as well but I get the same error. Even by downloading working source code and changing appId and appSecret I get the same error.
Anybody know what's going on?
Your token replacement code on your server did not run correctly.
Related
I've configured Facebook Login, and it works on desktop browsers. However, when using an actual iPhone connected to my laptop, two things happen:
the first time I enter my login details (with Cordova in-app browser), Facebook gives me this page: http://cl.ly/image/0n3Z083o2H0j
after I close and reopen the app, I look in GapDebug and see a request to something like https://auth.firebase.com/auth/facebook/callback?code=YDFasdfjsdfh893&fb_redirect_uri%22%3A%22file... with an error message "Failed to load resource: You do not have permission to access the requested resource."
It looks like the fb_redirect_uri is trying to get a file path instead of a URL -- is that right? Do I have a data access problem or what?
Not sure exactly what was going on, but I updated AngularFire and FirebaseSimpleLogin and then it worked.
Trying to get my head around OAuth 2.0. I am building a cross platform google drive app using PhoneGap Build and JQM.
I am able to format the request URL correctly and on both iOS and Android. It prompts the user for ID/PW using InAppBrowser (tried child browser too). Next user gets prompt with blue button on web page to "Allow Access" just like on other google web sites/apps. On Android all is well user taps allow access and callback finds the success code and I can grab the token. On iOS I get a "Load Error" message in the status bar of InAppBrowser but I can't trap the error to see what it is. It seems as if the redirect parameter breaks things before the startLoad or endLoad event can be called to trap success/failure in the response from Google.
Playing with oauth2-playground my URL looks correct and like I said it is working fine on Android.
Anyone have any ideas what differences I need to look at with regard to iOS? Been stumped here for a couple of days. Any and all help greatly appreciated.
I have tried redirecting back to http//localhost and http//localhost/afterOauth.html where afterOauth.html is a page in the app to give the redirect something to call the startLoad/endLoad event.
Update: I really think the problem has something to do with the redirect I give the original Google request. If I change "localhost" to urn:ietf:wg:oauth:2.0:oob which shows up in the google documentation both Android and iOS behave the same. They take me to a page saying "Please copy this code, switch to your application and paste it there" With the code=4/MyCode below it.
Also, I added a loaderror callback. It does not fire on Android but does on iOS giving error code -1004 and error message: could not connect to the server. However in the event.url of this loaderror it clearly shows the code=4/myCode. What is the missing link here for iOS and successful OAuth between Google?
I am trying to create a facebook application and this is my first time. I read several articles on how to create one and I created an application from this page https://developers.facebook.com/apps. When I clicked on Go to App from facebook right after I created it. It is showing this error
I have tried to look on Heroku dev center for same type of problem to resolve problem on my own I couldn't find any solution. When I do curl -v https://tranquil-oasis-2533.herokuapp.com it says HTTP/1.1 500 Internal Server Error. This is the output from heroku logs http://pastebin.com/0qdueiZE. Somebody please help me.
This appears to be an issue with the faceplate module. It is described here: https://github.com/heroku/faceplate/pull/20
You have two options to get around the issue:
Propose a fix to faceplate that works within the constraints of the Facebook application security here: https://developers.facebook.com/docs/ApplicationSecurity/
Take your Facebook app out of sandbox mode.
This seems to be issue with sandbox mode. Disable sandbox mode. Here is the steps how you can do it.
Go to https://developers.facebook.com/apps.
click "Edit Settings"
and selected radio button "disabled" for the "Sanbox Mode" under "basic info".
Hope this helps.
The error message points to what needs to be known
Cannot read property 'name' of undefined
<title><%= app.name %></title>
app is undefined. Probably want to check your web.js file to see what app is up to.
And ensure you have the latest node template for Heroku.
https://github.com/heroku/facebook-template-nodejs
My guess is that you aren't passing app as a local to the index.ejs template. If you're using Express, console.log(res.locals) before you res.render index.ejs. Is app in the logged output?
This question is similar to: Facebook Error 191 on canvas app using FB.ui() for the 'feed' dialog (worked before, stopped working last week) which was never answered.
Starting today, after the user likes the page and enters the contest, the share dialog which presented itself stopped working and gave:
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.
when logged in as an admin and just an error occurred for other users. This tab has been running well for a while now. I have confirmed it with an associate of mine. They did make a change to another part of the app (yesterday and today) but the sharing was still working until this afternoon. They did not change the part that generates the dialog.
The tab is: https://www.facebook.com/MedjoolDates/app_355398587864294
Anyone have any insight? Feel free to use 'cancel' rather than sharing and fake data to sign up, then unlike the page if you wish.
Thanks in advance.
David
Same problem here, there is a bug posted on Facebook Developes here:
https://developers.facebook.com/bugs/273845842724431
Can't help much without seeing your code.
One thing to check, make sure your redirection_uri is exactly as your domain registered with FB and that you include a trailing / ie http://www.myurl.com/ rather than http://www.myurl.com
I can't answer why it changed, but I had that error fixed by the above change before.
I am having the same issue. Am developing a new app with FB.ui feed functionality, which worked OK yesterday and today it gives the same error as OP.
Went back and checked an > 1 year old app with the same functionality; same error. I cannot see any other solution, than the FB dev team has changed something and not given notice.
ive seen many tutorials on setting up your facebook app
but i havent found anything that worked for me
best i found is a tutorial in youtube on link below
http://www.youtube.com/watch?v=zxIl4fUIXS4&feature=fvwrel
im not really sure on what im doing sice i dont know much about using php
i do know how to use asp.net and iis
in the tutorial he have a facebook.php downloaded from PHP SDK and index.php
i downloaded the facebook.php
and typed the content of his index.php on my notepad and saved as index.php
both file is found on my //localhost/facebook/firstpracticeapp/
i did try that that path works i put a sample.html file inside that and accessed is on browser using below just to see if it works and it does..
//localhost/facebook/firstpracticeapp/sample.html
now that i know it works i then setup the details of my app
used http://localhost/facebook/firstpracticeapp/ as Canvas URL
used http://apps.facebook.com/firstpracticeapp as Canvas Page
btw i edited the index.php as said on tutorial changing the app secret and app id to what was given to me...
not really sure what i missed but it says on tutorial if i run use my canvas page on browser it should display what is displayed on the tutorial
only thing i get is an error saying
HTTP Error 405.0 - Method Not Allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.
Detailed Error Information
Module DirectoryListingModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070001
Requested URL http:// localhost:80/facebook/firstpracticeapp/
Physical Path C:\FILES\Projects\facebook\firstpracticeapp\
Logon Method Anonymous
Logon User Anonymous
can someone tell me what seems to be the problem?
im thinking its the php i dont have enough info on how to use it
and i did it differently on what was on the tutorial cause i dont know idea what that phpacademy is for
if you guys know better link which is more detailed please reply with link
btw if you found spaces after http its because i cant post more than 2 links so i decided to put space there :)
many thanks
...nevermind, I was using out of date info.