1
kobe1941 OP 以下是打印的错误信息,重点在于"error":"Insufficient app permissions!","error_code":10014,权限不够
失败--<NSURLRequest: 0x8c31b10> { URL: https://api.weibo.com/2/statuses/friends_timeline.json?access_token=2.00vWf4GEsE94CD263c7e0837S1eYtC }--<NSHTTPURLResponse: 0x8cd6230> { URL: https://api.weibo.com/2/statuses/friends_timeline.json?access_token=2.00vWf4GEsE94CD263c7e0837S1eYtC } { status code: 403, headers { "Api-Server-IP" = "10.75.5.57"; Connection = "keep-alive"; "Content-Encoding" = gzip; "Content-Type" = "application/json;charset=UTF-8"; Date = "Tue, 29 Apr 2014 12:36:37 GMT"; Server = "nginx/1.2.0"; "Transfer-Encoding" = Identity; Vary = "Accept-Encoding"; } }--Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 403" UserInfo=0x8fd2200 {NSLocalizedRecoverySuggestion={"error":"Insufficient app permissions!","error_code":10014,"request":"/2/statuses/friends_timeline.json"}, AFNetworkingOperationFailingURLRequestErrorKey=<NSURLRequest: 0x8c31b10> { URL: https://api.weibo.com/2/statuses/friends_timeline.json?access_token=2.00vWf4GEsE94CD263c7e0837S1eYtC }, NSErrorFailingURLKey=https://api.weibo.com/2/statuses/friends_timeline.json?access_token=2.00vWf4GEsE94CD263c7e0837S1eYtC, NSLocalizedDescription=Expected status code in (200-299), got 403, AFNetworkingOperationFailingURLResponseErrorKey=<NSHTTPURLResponse: 0x8cd6230> { URL: https://api.weibo.com/2/statuses/friends_timeline.json?access_token=2.00vWf4GEsE94CD263c7e0837S1eYtC } { status code: 403, headers { "Api-Server-IP" = "10.75.5.57"; Connection = "keep-alive"; "Content-Encoding" = gzip; "Content-Type" = "application/json;charset=UTF-8"; Date = "Tue, 29 Apr 2014 12:36:37 GMT"; Server = "nginx/1.2.0"; "Transfer-Encoding" = Identity; Vary = "Accept-Encoding"; } }} |
2
kobe1941 OP 另外比较奇葩的是,我的AFN文件夹拉入工程后,不添加system,security,mobile这几个框架竟然编译可以通过(AFN 的.m文件已加入编译),奇葩啊,会不会是这里出了问题呢?
|
3
txx 2014-04-29 21:46:52 +08:00 1
1: 為何不用cocoapod 呢....
2: 為何抓包分析而是要打log呢... 3: Google 關鍵詞 "weibo 10014" |
4
ccbikai 2014-04-30 00:26:14 +08:00 via Android 1
非第三方客户端类appkey无权查看他人微博,开放平台文档看一下
|
5
kobe1941 OP @txx 1.cocoapod 不懂啊,AFN拿来就能用,我已经拿到微博账号的个人信息了,但是拿微博数据时出了问题不知道怎么回事,
2.用AFN 发送请求,没有返回数据,于是就打印下错误信息 3.谢谢,我给微博开放平台发私信了,叫我申请高级权限,但明明我调用的接口是普通接口。。。郁闷 |
6
lloydsheng 2014-04-30 14:23:04 +08:00
@kobe1941 关于cocoapod,你可以看看我这个帖子
|
7
kobe1941 OP @ccbikai 我目前可以查看已登陆用户的个人信息和关注的人、粉丝,这些都在user栏目下,但是抓取微博数据(在statuses栏目下)全部失败,我找新浪问去,谢谢!
|
8
ccbikai 2014-04-30 19:19:21 +08:00 1
|
9
kobe1941 OP @ccbikai 当前授权就是指登陆用户,我在测试时都是用授权过的账号登陆,然后通过发送包含appkey和response_type=token等请求拿到access_token和uid,再根据access_token和uid来抓取数据的,目前可以访问当前登陆账号个人信息,但是没法得到微博的数据,开始还以为friends_timeline的请求都要转为home_line,后来试了一圈,statuses下的接口(微博接口)都不能访问。希望帮忙分析下,谢谢!
新浪的文档说明: 获取自己的微博,参数uid与screen_name可以不填,则自动获取当前登录用户的微博; 指定获取他人的微博,参数uid与screen_name二者必选其一,且只能选其一; 接口升级后:uid与screen_name只能为当前授权用户,第三方微博类客户端不受影响; 读取当前授权用户所有关注人最新微博列表,请使用:获取当前授权用户及其所关注用户的最新微博接口(statuses/home_timeline); |
10
kobe1941 OP |