Reputation: 79
I publish some photos to Facebook, for example:
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];
}];
}
and this photos published in default photo album to Facebook (appName photos). How create new photo album in current iteration?
Upvotes: 0
Views: 1479
Reputation: 79
I resolve my problem, i need this string :
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);
}
}];
Upvotes: 1