Bad Authentication data (code 215) with Phonegap/Cordova


#1

Hello,

After Oauth authentification done with Oauth.io, i can’t have access to the user_timeline, it only show a bad authentification data with the code 215. Maybe i forgot some parameters ? I did’nt find any issue to my problem. I think i’m missing something but i can’t find what.
I paste my code below, if someone could help me :slight_smile:

Thanks

$(document).on( 'deviceready', function() {
OAuth.initialize("my key");

$('#twitter-connect').on('click', function() {

    OAuth.popup('twitter', function(error, result) {

        result.get('/1.1/account/verify_credentials.json').done(function(data) {

            console.log(data);

            var screen_name = data.screen_name;

            $.ajax({
                url : "https://api.twitter.com/1.1/statuses/user_timeline.json",
                dataType: "json",
                type: "get",
                data:{
                    screen_name: screen_name
                },

                error: function(xhr, status){
                    alert(xhr.responseText);
                },

                success: function(data, xhr, status){
                    console.log(data);
                }
            });
        });
    });
});

});