callbackUrl = window.location.origin + window.location.pathname + window.location.pathname;
qq: {
get_authorize_link: function(callbackUrl, state, isMobile) {
var redirect_uri = callbackUrl;
var link = 'https://graph.qq.com/oauth2.0/authorize?client_id=101285264';
link += '&redirect_uri=' + encodeURIComponent(redirect_uri);
link += '&scope=get_user_info';
if (isMobile)
link += '&display=mobile';
if (state)
link += '&state=' + state;
link += '&response_type=code';
return link;
}
},
window.location.href = link;
返回的是:http://www.eyee.com/#/discovery?code=6928A4B9BB8BD037041E0AC1783F38B9&state=1460161958
怎么使用code 获得 Access Token
官方文档的不知道怎么使用?
有人可以详细说一下吗
我用的是angular + nodejs
第一次做OAuth2.0的接入把?OAuth2.0的接入流程都是近似的,通过code换取access token是一个单独的接口。地址是: https://graph.qq.com/oauth2.0/token 参数在文档里说得很清楚吧:
http://wiki.open.qq.com/wiki/website/%E4...