I want to upload the image to the facebook. I could upload the photo along with caption. I also want to upload the description
I tried adding the key "description" to the dictionary. But it didn't work.
Is it possible to upload the description as well?
Following is the code i am using..
- (void)postToWall {
FBRequest *uploadPhotoRequest = [FBRequest request];
NSData* imageData = UIImageJPEGRepresentation(saveImage, 1.0);
UIImage *image_ = [[UII开发者_运维百科mage alloc] initWithData:imageData];
FBPermissionDialog* dialog1 = [[[FBPermissionDialog alloc] init] autorelease];
dialog1.delegate = self;
dialog1.permission = @"photo_upload";
[dialog1 show];
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Hey!!!!!!", @"caption",
@"I Own It..", @"description", //This didn't post the description..
nil];
if (nil!=image_)
[uploadPhotoRequest call:@"photos.upload" params:params dataParam:(NSData*)image_];
NSLog(@"image uploaded");
[image_ release];
}
Have a look at this
http://www.raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone-app
精彩评论