-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtx-weibo-data.txt
More file actions
169 lines (125 loc) · 3.39 KB
/
tx-weibo-data.txt
File metadata and controls
169 lines (125 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/*QQ互联里面没有读取微博列表的功能,这点很遗憾*/
/*获取腾讯微博登录用户的用户资料。
接口地址 https://graph.qq.com/user/get_info
*/
https://graph.qq.com/user/get_info?access_token=*************&oauth_consumer_key=123456&openid=****************&format=xml
/*
返回格式为json 编码utf-8
*/
{
"errcode":0,
"msg":"ok",
"ret": 0,
"data":{
"province_code":"42",//省份id
"location":"中国 湖北 武汉",
"head":"http://app.qlogo.cn/mbloghead/563ad8b6be488a07a694", //后面加尺寸 100 50 30 或者 20(有时候没有)
"idolnum":84,//用户收听数量
"fansnum":152,//粉丝数量
"favnum":111,//用户收藏数量
"tweetnum":444,//用户发表的微博数
"homepage":"",//个人首页
"introduction":"",//个人介绍
"name":"",//用户的帐号名
"nick":"",用户昵称
"openid":"813B5DD59D54FE52FAC72AC1BF28EE82", //一般为32位
"regtime":1299585734,//注册时间的时间戳
"send_private_flag":0,
"sex":1,//用户性别(1:男; 2:女; 0:未填写)。
"tweetinfo":[
{
"city_code": "3",
"country_code": "1",
"province_code": "44",
"location": "中国 广东 深圳",
"from": "腾讯微博",
"fromurl": "http://t.qq.com\n",
"id": "131008025107394",
"image": null,//存在时返回字符串url
"origtext": "开心",
"self": 1,
"status": 0,
"text": "开心",
"timestamp": 1337765791,
"type": 1,//表示微博的类型。1:原创发表;2:转播;3:私信;4:回复;5:没有内容的回复;6:提及;7:评论。
"video": null,//视频 字符串url
}
],
}
}
/*获取腾讯微博其他用户的用户资料。
接口地址 https://graph.qq.com/user/get_other_info
*/
/*传递参数可以是微博号*/
https://graph.qq.com/user/get_other_info?access_token=*************&oauth_consumer_key=123456&openid=****************&name=shmshz&format=xml
/*也可以是QQ的openid*/
https://graph.qq.com/user/get_other_info?access_token=*************&oauth_consumer_key=123456&openid=****************&fopenid=指定用户的openid&format=xml
/*返回的格式同上*/
/*发布普通微博
接口地址
https://graph.qq.com/t/add_t
参数全部post传递
*/
/*传递的参数有*/
{
"oauth_consumer_key":"",
"openid":"",
"access_token":"",
"format":"json",
"content":"",//内容必须经过编码
"clientip":"127.0.0.1",//IP可选
"jing":0.0,//经纬度可选
"wei":0.0,//经纬度可选
}
/*返回数据*/
{
ret:0,
msg:"ok",
errcode:0,
data:
{
id:12345678,
time:12863444444
}
}
/*发布图片微博
接口地址
https://graph.qq.com/t/add_pic_t
参数全部post传递
*/
/*传递的参数有*/
{
"oauth_consumer_key":"",
"openid":"",
"access_token":"",
"format":"json",
"content":"",//内容必须经过编码
"pic":,//必须数据以binary方式传递 要上传的图片的文件名以及图片的内容(在发送请求时,图片内容以二进制数据流的形式发送,见下面的请求示例)。图片仅支持gif、jpeg、jpg、png、bmp及ico格式(所有图片都会重新压缩,gif被重新压缩后不会再有动画效果),图片size小于4M。
"clientip":"127.0.0.1",//IP可选
"jing":0.0,//经纬度可选
"wei":0.0,//经纬度可选
"compatibleflag":"",
//容错标志即当图片不正确时是否以普通微博发布
//容错标志(类型字符串),支持按位操作,默认为0。0x2:图片数据大小错误则报错;0x4:检查图片格式不支持则报错;0x8:上传图片失败则报错;0:以上错误均做容错处理,即发表普通微博;0x2|0x4|0x8:同旧模式,以上各种情况均报错,不做兼容处理。
}
/*返回数据*/
{
ret:0,
msg:"ok",
errcode:0,
data:
{
id:12345678,
time:12863444444,
imgurl:"http://t1.qpic.cn/mblogpic/3b0dde076353bc94c2c8/460"
}
}
/*错误返回数据
判断json.ret==0
ret不为0时再判断errcode或者输出msg就可以了
*/
{
ret:4,
msg:"禁止访问,城市,QQ号码被加入黑名单",
errcode:5
}