Anu Nair Anu Nair - 1 year ago 85
Git Question

Facebook login for phonegap app

Im trying to include facebook login to my phonegap application. I have used the plugin for this. Im getting the error like this when i try to test the login in my phone:

"given url is not allowed by the application configuration one or more of the given urls isnot allowed by the apps settings. to use this url you must add a valid native platform in your apps settings"


if(data.status == "connected"){
//alert('Already logged in');
// goto login
},function(e){ console.log(e);});

facebookConnectPlugin.login(["public_profile"], function(data){
console.log('login success');
}, function(e){

//var facebook_email;

var apiTest = function () {
facebookConnectPlugin.api( "me/?fields=id,email",
function (response) {
// localStorage.setItem('facebook_email',;
// localStorage.setItem("facebook_flag","1");
// window.location="getting-started.html";
//alert("after navigation");
function (response) {

Answer Source

Sounds like a facebook app configuration problem. Did you set up the facebook login in the app and did you ad an android and ios platform in the facebook app?

For android you need to generate a key for example.

You can use that link to guide you through the process:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download