这是简单的代码
UIImage *ScreenShot = [self getScreenshot];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Name", @"name",
@"Caption.", @"caption",
@"Description.", @"description",
@"www.example.com", @"link",
ScreenShot, @"picture",
nil];
[ facebook dialog:@"feed"
andParams:params
andDelegate:self];
当我编译它时收到此消息
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage length]: unrecognized selector sent to instance 0x1288bb90' *** First throw call stack:
最佳答案
您无法将图像直接上传到墙上,而在发布到墙上时,您只能将图像链接到墙上。
因此,您需要先将UIImage上传到某个地方。您有2个选择:
关于objective-c - 使用UIImage作为@“picture”共享Facebook对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11070398/