tags:

views:

11

answers:

0
NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:2];
NSArray *paths = SearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
NSString *uniquePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"IMAGE_0001.PNG"];
UIImage *picture = [UIImage imageWithContentsOfFile: uniquePath];
FbGraphFile *graph_file = [[FbGraphFile alloc] initWithImage:picture];
[variables setObject:graph_file forKey:@"file"];
[variables setObject:@"this is a test message: postPictureButtonPressed" forKey:@"message"];
[fbGraph doGraphPost:@"me/photos" withPostVars:variables];

im using this code to upload images on facebook the problem is that it can only upload only one picture that is IMAGE_0001.PNG , how can i make this code to work for IMAGE_0002,3,4,5 e.t.c

thanks in advance...

related questions