I have followed the oauth-phonegap/cordova read me found here: https://github.com/oauth-io/oauth-phonegap and gotten it to successfully return an access token. When I call a get request on the the result as described in that read me and in the .get request here: https://oauth.io/docs/api, nothing happens. Can anyone help or point me in the right direction? My code is in a function on the scope in angular/ionic.
My code is:
$scope.fbLogin = function(){
OAuth.initialize('8MM1IzKx4mPk_ikOvaTCIZ3OWoM');
OAuth.popup("facebook", function(e,r) {
if (e){
alert('error: ' + e.message);
}
else {
r.get("/me").done(function(res){
alert('here2');
$scope.userName=res.name;
})
}
});
// the access_token is available via r.access_token
// but the http functions automagically wrap the jquery calls
};