Facebook 在 iPhone 中上传照片以及描述和标题

发布于 2024-11-04 05:27:39 字数 1001 浏览 0 评论 0原文

我想将图像上传到 Facebook。 我可以上传照片和标题。我还想上传

我尝试将关键“描述”添加到字典中的描述。但这没有用。

是否可以同时上传说明?

以下是我正在使用的代码..

- (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];
}

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_  = [[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];
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文