Facebook在iphone上上传照片,并附上描述和说明



我想上传图片到facebook。我可以上传照片和标题。我还想上传描述

我尝试在字典中添加关键字"description"。但是没有成功。

是否可以上传描述?

下面是我使用的代码…

- (void)postToWall {
    FBRequest *uploadPhotoRequest = [FBRequest request];
    NSData* imageData = UIImageJPEGRepresentation(saveImage, 1.0); 
    UIImage  *image_  = [[UIImage 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];
}

看看这个
http://www.raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone-app

最新更新