0

我将一些照片发布到 Facebook,例如:

for (int idx = 0 ; idx < 5; idx++){
[FBRequestConnection startWithGraphPath: @"me/photos"
parameters: params
HTTPMethod: @"POST"
completionHandler: ^(FBRequestConnection *connection,
id result,
NSError *error) {
[self requestCompleted:connection withResult:result andError:error];
}];
}

并将这张照片在默认相册中发布到 Facebook(appName 照片)。如何在当前迭代中创建新相册?

4

1 回答 1

1

我解决了我的问题,我需要这个字符串:

NSMutableDictionary *paramsToCreateAlbum = [NSMutableDictionary dictionaryWithObjectsAndKeys:
        @"album ", @"name",
        @"description", @"message", nil];

[FBRequestConnection startWithGraphPath: @"me/albums"
                             parameters: paramsToCreateAlbum
                             HTTPMethod: @"POST"
                      completionHandler: ^(FBRequestConnection *connection,
                              id result,
                              NSError *error) {

                          if (!error) {
                              //publish content to albumID
                              [self publishContentToAlbum:[result objectForKey:@"id"]];
                          }
                          else {
                              NSLog(@"error: %@", error);
                          }
                      }];
于 2013-02-25T09:30:39.660 回答