我正在尝试在用户登录Instagram后实现获取访问令牌。 在我的server / main.js中,我有
before
注册的redirect_uri是http://localhost:3000/_oauth/instagram
转到http://localhost:3000会带我到带有URL的Instagram登录信息 https://www.instagram.com/accounts/login/?force_classic_login=&next=/oauth/authorize/%3Fclient_id%3D***%26redirect_uri%3Dhttp%3A//localhost%3A3000/_oauth/instagram%26response_type%3Dcode%26scope%3Dfollower_list
但是,当我登录时,我被重定向到 http://localhost:3000/_oauth/instagram?code=*** 我在控制台中收到以下错误:
after
和
Router.route('/', function() {
this.response.writeHead(302, {
'Location': 'https://api.instagram.com/oauth/authorize/?\
client_id=' + '***' +
'&redirect_uri=http://localhost:3000/_oauth/instagram\
&response_type=code\
&scope=follower_list'
});
this.response.end();
}, {where: 'server'});