Facebook 在 iPhone 中上传照片以及描述和标题
我想将图像上传到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个
http://www .raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone-app
Have a look at this
http://www.raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone-app