生成奖状发微博
儿童编程
发奖状
Method and URL Structure
| Method |
MethodResource URL |
Descriptions |
Authentications Required |
| POST |
/server/weibo_share/share/ |
YES |
|
Request Params
| Name |
Description |
Required |
Default |
| name |
名字 |
YES |
|
| text |
文字信息 |
YES |
|
| redirect_uri |
微博验证通过后回调的 html5 地址, 例如: https://coding61.com/weibo.html |
YES |
|
| share_uri |
微博上显示的链接地址 |
YES |
|
cURL Example
curl -X POST --data '{...}' http://127.0.0.1:8000/server/weibo_share/share/
JSON Response
正常返回
{ "status": 0, "message": ""}
访问微博验证接口
Method and URL Structure
| Method |
MethodResource URL |
Authentications Required |
| POST |
/server/weibo_share/access_token/ |
|
Request Pramaters
{ "redirect_uri": "" "share_uri": ""}
Request Data
cURL Example
curl -X POST -H 'Authorization: Token db02586eda69b432699b2f9031e02e8f5deda8db' --data {...} http://127.0.0.1:8000/server/weibo_share/access_token/
JSON Response
{ "status": 0, "message": "", "url": "https://api.weibo.com/oauth2/authorize?client_id=3843589308&display=mobile&response_type=code&redirect_uri=https://develop.cxy61.com&state=e76hma75g9jm5aeo48ala412ibbhm6hp",}
获取用户信息
Method and URL Structure
| Method |
MethodResource URL |
Authentications Required |
| POST |
/server/weibo_share/get_user_info/ |
|
Request Pramaters
{ "redirect_uri": "" "code":""}
Request Data
cURL Example
curl -X POST -H 'Authorization: Token db02586eda69b432699b2f9031e02e8f5deda8db' --data {...} http://127.0.0.1:8000/server/weibo_share/access_token/
JSON Response
{ "status": 0, "message": "", ...}