$http({
method: 'JSONP',
url: 'https://api.twitter.com/1.1/friends/list.json?screen_name=%40name',
headers: {
Authorization: 'bearer AAAAAAAAAAAAAAAAAXXXXXXXXXXXXXXXXXXXXXXXXNxXXXXXXXXXXXX'
}
}).then(function (data) {
console.log(data);
});
I am trying to get my followers list from twitter.whats wrong with my code?
thanks for all help.
JSONP
can not be called with headers.We must use GET
to pass headers.