0
Auth0経由でTwitter認証を公開してaccess_tokenを取得できました。私はヘッダーでそのaccess_tokenを使用しようとしていますが、Twitterから401エラーが発生しています。Auth0経由でTwitter APIの投稿認証にアクセスする
$http.defaults.headers.common['Authorization'] = 'Bearer ' + localStorage.getItem('twitter_access_token');
$http.jsonp('https://api.twitter.com/1.1/statuses/user_timeline.json?callback=JSON_CALLBACK').then(
function (response) {
console.log(response);
},
function (response) {
console.log(response);
}
);
私は間違っていますか?