nraboy / ng-cordova-facebook-example

Ionic Framework ngCordova Oauth Example for Facebook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Given URL is not allowed by the Application

manujbahl opened this issue · comments

I followed the setup instructions but when i run the app on emulator i get ..

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.

Any idea what this means and how to get around that issue ?

Did you make the Facebook application public in the Facebook dashboard?

yes ...
I use the same app for my native iOS project. It works perfectly fine.

What should we be setting as the websiteurl and callback url in the fb app settings ?

This isn't a native app, it is a web app. You need to set the oauth callback url to http://localhost/callback

great that helped .. it logged in in.. Still can not get the profile or the feed.
get request returns a 404
Object {data: "", status: 404, headers: function, config: Object, statusText: "Not Found"}config: Objectdata: ""headers: function (name) {arguments: (...)get arguments: function ThrowTypeError() { [native code] }set arguments: function ThrowTypeError() { [native code] }caller: (...)get caller: function ThrowTypeError() { [native code] }set caller: function ThrowTypeError() { [native code] }length: 1name: ""prototype: Object__proto__: function Empty() {}status: 404statusText: "Not Found"proto: Object

when i do the same http request in my browser it works just fine .. and returns the data

Does oauth work?

The errors you get, are those coming from ADB or Xcode? Where are you obtaining them?

I'm encountering the same issue here. I have the Google integration working so I know the plugin is set up correctly.

The Facebook app is set to Public. Additional settings are:

  • App Domains: localhost
  • Site URL: http://localhost
  • Advanced > Valid OAuth redirect URIs: http://localhost/callback

However, when initializing the application on my device, I receive the warning and no response comes back from Facebook after completing the OAuth flow.

Could this have something to do with the fact that Cordova runs using a file:// URL?

My mistake -- these settings work correctly, it's just that the response object was different than I expected. So in fact this is a good example of working settings! 👍

Just to clarify, I do still receive the warning. However, the OAuth flow works as expected.

I m trying to the same. But after logging in I don't get any success or error .
screenshot_2015-09-16-08-34-05 and here Facebook is started running.
I don't get any response. What I m missing..
Here is my code

$scope.facebookLogin = function() {
alert("inside method");
$cordovaOauth.facebook("758054910972122", ["email"]).then(function(result) {
alert("sadid");
alert(result.data);
// results
}, function(error) {
alert("error");
alert(error);
// error
});

See this #19. It is the second report that I've received today.

My guess is Facebook is having problems, but without seeing anyones logs I cannot better advise.

After pressing back button i got error " sign in flow cancelled". I started Cordova yesterday. I don't know much about how to log. Seeing ur answer I searched and find log plugin. I m trying to use it. I will provide the log to let you know. Thank you for your quick response.

I just downloaded the repository, built it, and tested it myself. I received no problems which leads me to believe you have an incorrect setup in your Facebook dashboard.

It's 02:57 here in Brazil and it was driving me crazy. Thank you boys for saving my time. Now I can sleep in peace.