【发布时间】:2013-01-24 12:15:03
【问题描述】:
我正在使用 FB SDK 并在从我的应用程序上传 FB 帖子上的图片时出错 在我看来确实加载了我有和 UIImageView 有一个我需要在 FB 上发布的图像视图的代码确实加载了
ImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 65, 65)];
ImageView.center = CGPointMake(42, 43);
[View addSubview:ImageView];
在我的 FB 帖子中,我做到了这一点
UIImage *image = [[UIImage alloc]init];
image = ImageView.image;
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:3];
[params setObject:@"LINK_HERE" forKey:@"link"];
// due to this line below, i am getting an error :
// "[UIImage length]: unrecognized selector sent to instance 0x170fa0e0"
// and if use http link instead of image(UIImage) it works, but i want to use my image
[params setObject:image forKey:@"picture"];
[params setObject:@"NAME_HERE" forKey:@"name"];
[params setObject:@"DEC_HERE" forKey:@"description"];
// Invoke the dialog
[self.facebook dialog:@"feed" andParams:params andDelegate:self];
我应该如何在这段代码中使用我的 UIImage ......有什么想法吗??
【问题讨论】:
-
yashesh87.wordpress.com/2012/10/01/… 上传图片的简单方法。
-
在这里查看我的答案。 stackoverflow.com/questions/6959961/…
标签: iphone ios xcode facebook facebook-graph-api