Having an issue with phonegap facebook login without plugin - facebook

I have a phonegap app in iOS and I'm trying to do a login with facebook. I'm using the javascript sdk. When I try to use fb.getlogin status or fb.login, not sure which, it gives me this error:
"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
I have searched for this error, obviously, but nothing seems to solve my issue.
I looked in the facebook app settings, and everything seems to be in order.
I'm probably crazy for asking this with so little detail, but, any suggestions, ideas?

I have never used their SDK but I would have to guess that you are making the javascript calls from within your app and the SDK is saying that it doesnt recognize the URL that the call is coming from. Even though your phone doesn't have a URL (though you could give it one but that is a whole different story) it does still have an IP and that IP isnt matching what FB is expecting. I am sure you registered for a FB developer account or something like that and it asked for a URL of where the calls would be coming from. That needs to match. I dont know how you would get around this. I think you need to use the plugin.

Related

Yet another Facebook OAuth error 500

Today I moved my facebook application to nodejitsu and I couldn't figure out what was wrong in the oauth/dialog GET request.
I validated that I had:
added the new application domains to my application settings
the redirect URI was good, for example, app.nodejitsu.com
I played around so much with these properties and I didn't figure out why it was still giving me a 500 error. I checked most of the posts on stackoverflow and although they all seemed to be valid errors, they didn't seem to reflect my issue.
This is how I found my problem.
After migrating the app to nodejitsu my localhost app still worked. So I decided to remove localhost from the accepted app domains in the facebook settings. When I tested it again I got this error:
"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
Ok, so this made my think. If the problem was with an incorrect domain I would still get this message for nodejitsu, so I had an error with the request I reckoned.
I manually edited the request and I figured out that my redirect_uri did not start with http.
I changed this and it worked.

Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings

This error appears in the authentication process:
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
Why is this happening, and how can I fix it?
I ran into this issue when I was doing some learning exercises a few days ago while creating a Facebook app and using Heroku as the host. My problem was that I had the wrong URL in my Facebook app settings for the "Website with Facebook Login" field value.
Also, for some hosts the URL may change depending on settings etc., so check your hosting URLs for the app and make sure you have the correct URL in that field on Facebook app settings.
Once I updated mine, the error went away and all is fine.
Good Luck!
Connie
If you are on your development machine, be sure that you don't mix up localhost:3000 with 0.0.0.0:3000. Although on your development machine it is practically the same thing, the Facebook API won't recognise this and will return the error. Make sure the url is exactly the same everywhere.

Blank Canvas Page for iFrame App

I'm working on an iframe style app that pulls the facebook optimized page available at http://store.starrco.com/?store_mode=facebook. I've done other, admittedly much simpler, iframe apps before without issue but though I've configured this one more or less the same when I try to view the canvas url it remains blank.
My settings can be seen here: http://www.abstraktmg.com/clients/starrco/starrcofbsettings.jpg
I've tried a few different permutations of this with the same results, this is the most complete setup though and most closely matches the settings template I was given.
This page is being generated by Webasyst's shop-script, which is specifically supposed to support this. The obvious answer then is to contact their support which I did, but after assuring them that my app settings matched their template, they said I needed to contact Facebook support and this is as close as I could find to any proper support system.
I checked both http and https versions of store.starrco.com/?store_mode=facebook and both worked outside of facebook.
However, there may be some framebusting code which might prevent the site from being loaded in an iframe. And I see that your settings appear to be missing the app domain entry.
I ran into the same problem, especially in Chrome and Firefox. The problem is, when the user is surfing with https on Facebook, the https Version of the iframe is called. But the browser do not show invalid certificate problems until you to right click page information.
You need to have a signed SSL cert by a CA trusted in the browser.
If the user has accepted it without the iframe - outside of Facebook, it works.

Facebook newbie - can't login to application - gettin an error with no helpful information

I'm trying to implement my first Facebook application, and I'm stuck on the very first coding step.
I created an application on the Facebook website, I got my application ID and I'm doing an ASP.NET app to test the authentication. It has just one line:
Response.Redirect(
"https://www.facebook.com/dialog/oauth?client_id=MYAPPID&redirect_uri=localhost");
When I run it, it redirects to facebook and I get:
An error occurred with MYAPPNAME. Please try again later.
It fetches the app name, so the ID is correct and there is very little else that I could have got wrong :-)
I also tried using other URLs instead of localhost, and I'm currently arranging for a VPS to try it with a publicly deployed web app in case it doesn't work with a local one.
Searching only found me lots of posts complaining about similar issues - but not the same one. I found this question that looks quite similar, but the confirmed answer speaks about editing FB.init() which is I guess part of some SDK, so not applicable for me.
Your redirect uri must be a url that is within the domain that you configured in your application set up. As noted in the documentation.
"The redirect_uri must be within the same domain as the Site URL you specify in Web site tab of the Developer App"

Is there no longer a connect URL for using the Facebook Javascript SDK

Its quite possible I'm missing something obvious here; I hope so.
I have been trying to get a Facebook game that posts to the user's wall after the game has finished working. As I understand it, this should be a pretty simple process (and there appears to be several different approaches).
I have tried most of these, and they all seem to fail for the same reason; I do not have a 'connect' URL (which, as I understand it, is also called a canvas callback URL?) set correctly.
This sounds easy to fix, but it seems like the application settings page has recently changed. Often a 'connect' tab is referred to, but this no longer exists. All I have is a 'Facebook integration' tab and this has only the canvas URL, there doesn't appear to be a connect URL.
You need to set the URL in the Website Section. You'd be best settings the domain as well just to make sure. I find it best practise to set the URL in the Facebook Integration tab as well as then Website tab regardless of the type of Facebook integration I am creating
You are correct that the error message is out of date, the connect URL is the Website URL now (just wanted to clarify)