How to create facebook album through iOS app


i) facebook accessToken


-(void)createFbAlbumwithName:(NSString *)AlbumName andId:(NSString *)bubbleId{

NSString *token=[[NSUserDefaults standardUserDefaults] objectForKey:@”fb_access_token”];


[self alertForfacebookAlbum:@”Your account not connected to facebook.” withActionTitle:@”Cancel”];



NSMutableDictionary *paramsToCreateAlbum = [NSMutableDictionary dictionaryWithObjectsAndKeys:

                                               AlbumName, @”name”,

[NSString stringWithFormat:@”This album is created by YourApp app for Event ‘%@'”,AlbumName], @”message”,token,@”access_token”, nil];

[FBRequestConnection startWithGraphPath: @”me/albums”

parameters: paramsToCreateAlbum

HTTPMethod: @”POST”

completionHandler: ^(FBRequestConnection *connection,

id result,

NSError *error) {

if (!error) {

//publish content to albumID

NSLog(@”album key is %@”,[result objectForKey:@”id”]);

facebookAlbumId=[result objectForKey:@”id”];



else {

NSLog(@”error: %@”, error);

[self alertForfacebookAlbum:@”Error in creating facebook album” withActionTitle:@”Retry”];


                          }]; }


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: