Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c FBI请求获取相册的照片_Objective C_Facebook Graph Api - Fatal编程技术网

Objective c FBI请求获取相册的照片

Objective c FBI请求获取相册的照片,objective-c,facebook-graph-api,Objective C,Facebook Graph Api,我正试图从Facebook的一个页面上获取特定专辑的封面照片 for(NSDictionary *album in albums) { [albumNames addObject:[album objectForKey:@"name"]]; NSLog(@"%@\n", [album objectForKey:@"id"]); [[FBRequest requestWithGraphPath:[NSS

我正试图从Facebook的一个页面上获取特定专辑的封面照片

for(NSDictionary *album in albums)
         {
             [albumNames addObject:[album objectForKey:@"name"]];
             NSLog(@"%@\n", [album objectForKey:@"id"]);
             [[FBRequest requestWithGraphPath:[NSString stringWithFormat:@"%@/photos", [album objectForKey:@"id"]] parameters:nil HTTPMethod:nil]
              startWithCompletionHandler:
              ^(FBRequestConnection *connection,
                FBGraphObject *albumPhoto,
                NSError *error) {
                  if(!error) {
                      [albumCoverPhotos addObject:[UIImage imageWithData:[[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:[[albumPhoto objectForKey:@"data"] objectForKey:@"picture"]]]]];
                  }
              }];
         }
但是,如果(!error)因此
albumCoverPhotos
在此代码末尾为空,则它不会执行


我的目标是将页面中所有相册的所有封面图像放入数组
albumCoverPhotos

所以,这可能是一个错误。放在NSLog之后(错误。本地化描述);看看它显示了什么错误是200,它起作用了,我在graph API explorer中误读了相册的结构:)