微博api调取流程

1.先创建微连接或轻应用(获取到App Key  和 App Secret)
App Key:4200929625
App Secret:08607ff2e036d2718b64bcba6bdbf78c

2.根据https://api.weibo.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=YOUR_REGISTERED_REDIRECT_URI
client_id :App Key
redirect_uri  : 在高级信息中设置授权回调页

3.会生成code        eg:   code=8a36c00dcff81f70cb4f340f3e8d273b

4.根据生成的code   换取token    
https://api.weibo.com/oauth2/access_token?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=authorization_code&redirect_uri=YOUR_REGISTERED_REDIRECT_URI&code=CODE
post请求      
eg : {
    "access_token": "xxxxxxxxxxxxxxxxxxxxxxxxx",
    "remind_in": "157679999",
    "expires_in": 157679999,
    "uid": "6613798869",
    "isRealName": "true"
}

5.根据token 就可以去微博API获取自己想要的数据


你可能感兴趣的:(微博api调取流程)