ajax获取access token,新浪微博access_token获取

@吴瑞祥:新浪微博给出来的都是Java,或者其他语言版本 的。

我现在要做成像前段的那种形式。

就是在浏览器里面用的。

然后我用ajax去请求的话就会产生跨域

$.ajax({

type: "POST",

url: "https://api.weibo.com/oauth2/access_token?client_id=605978378&client_secret=527b1b7cb3513349d02ece1536c175f4&grant_type=authorization_code&redirect_uri=http://localhost:63342/sinatest/index.html&code=253427e618369f0f56bb83abff69e5e4",

dataType: "json",

success: function(data) {

console.log(data);

}

});

我就是用这个请求的可是会有跨域