获取相册列表
获取相册列表的请求只需直接获取即可[_tencentOAuth getListAlbum];获取相册列表的数据,只需实现TencentSessionDelegate协议的响应方法即可,该协议方法如下:
// 获取用户QZone相册列表回调 - (void)getListAlbumResponse:(APIResponse*) response; |
取得相册列表的具体方法如下:
- (void)getListAlbumResponse:(APIResponse*) response { if (URLREQUEST_SUCCEED == response.retCode && kOpenSDKErrorSuccess == response.detailRetCode) { // 取得相册数据 NSArray *blumArray = [[response jsonResponse] objectForKey:@"album"]; } else { NSString *errMsg = [NSString stringWithFormat: @"errorMsg: %@\n%@", response.errorMsg, [response.jsonResponse objectForKey:@"msg"]]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"操作失败" message:errMsg delegate:self cancelButtonTitle:@"我知道啦" otherButtonTitles: nil]; [alert show]; } } |