I am building an Android App, using Phonegap. I have included oauth.io and have configured twitter / google+ and facebook logins.
I have included : OAuth.initialize('ACTUAL PUBLIC KEY');
in the device ready event.
I have written the same function, as per sample :
function login(provider, callback) {
OAuth.popup(provider)
.done(function(result) {
callback(null, result);
})
.fail(function(error) {
console.log(error);
callback(error);
});
}
When I call this function, InApp
browser is opened and credentials are coming up, for each provider respectively. When the user logs in successfully, it goes to
It does not come back to the Android App.
The InApp
browser also does not close automatically.
As per manual, it should call back the function. Instead it is redirecting to a web page, which does not exist in Phonegap App.
Please guide.
Removed and added the plugin. It worked. Thanks.