I'm trying to configure different logins. I've successfully configured the Facebook and Instagram ones but I have problems with Twitter and Linkedin: when I click on the login button I don't receive any error and the new window doesn't open. It successfully enters in the controller (since the "Twitter login" alert appears) but later I don't receive any result from the call "cordova0auth.twitter".
This is the code for Twitter (the keys have been substituted by XXXX:
facebookExample.controller("TwitterLogin", function($scope, $cordovaOauth, $localStorage, $location) {
$scope.twitterlogin = function() {
alert("Twitter login")
$cordovaOauth.twitter("XXXX","XXXX").then(function(result) {
alert(result)
$localStorage.accessTokenTwitter = result.access_token;
$location.path("/login");
}, function(error) {
alert("There was a problem signing in! See the console for logs " + error); // improve the description of possible errors
console.log(error);
});
};
})
Hi Nraboy
I'm trying to configure different logins. I've successfully configured the Facebook and Instagram ones but I have problems with Twitter and Linkedin: when I click on the login button I don't receive any error and the new window doesn't open. It successfully enters in the controller (since the "Twitter login" alert appears) but later I don't receive any result from the call "cordova0auth.twitter".
This is the code for Twitter (the keys have been substituted by XXXX:
facebookExample.controller("TwitterLogin", function($scope, $cordovaOauth, $localStorage, $location) { $scope.twitterlogin = function() { alert("Twitter login") $cordovaOauth.twitter("XXXX","XXXX").then(function(result) {
alert(result) $localStorage.accessTokenTwitter = result.access_token; $location.path("/login");
}, function(error) { alert("There was a problem signing in! See the console for logs " + error); // improve the description of possible errors console.log(error); }); }; })
Thanks