baidu_15855419
影子yeah
2015-11-24 03:32

获取新浪微博用户昵称接口为什么总是不正确呢,这个应该怎么调啊???

  • 用户信息
  • 接口
  • 新浪微博
  • ios

NSString * path=[NSString stringWithFormat:@"https://api.weibo.com/2/users/show.json?source=%@&access_token=%@&uid=%@",kAppKey,self.wbtoken,self.wbCurrentUserID];
NSURL * url=[NSURL URLWithString:path];
ASIFormDataRequest * request=[ASIFormDataRequest requestWithURL:url];
request.requestMethod = @"GET";
request.url=url;

    NSLog(@"request.responseData>>>>>%@",request.responseData);
    NSDictionary * jsonDic=[NSJSONSerialization JSONObjectWithData:request.responseData options:kNilOptions error:nil];
    NSLog(@"jsonDic>>>>>%@",jsonDic);
    NSString * userName=jsonDic[@"screen_name"];

    [request setCompletionBlock:^{
        NSLog(@"%@",request.responseString);
    }];
    [request startAsynchronous];
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答