0
我一直在尝试使用facebook图形API在Facebook上发布照片。验证用户后,我做的是通过抛出异常以下使用图形api在Facebook墙上发布图像iphone sdk
NSMutableDictionary *variables = [[NSMutableDictionary alloc]init];
[variables setObject:@"some text" forKey:@"message"];
[variables setObject:@"some link" forKey:@"link"];
[variables setObject:[UIImage imageNamed:@"[email protected]"] forKey:@"picture"];
NSString *str = @"me/feed";
NSLog(@"str: %@", str);
FbGraphResponse *resp = [self.fbGraph doGraphPost:str withPostVars:variables];
NSLog(@"resp: %@", resp.htmlResponse);
但我的应用程序崩溃:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: -[UIImage dataUsingEncoding:]: unrecognized selector sent to instance 0x11545140'
所以有些人可以帮我我如何在Facebook上墙一些消息一起张贴图片使用图形API。
可能给定的复制http://stackoverflow.com/questions/3990433/facebook-photos-upload-crash-in-facebook-api –
这是使用图形API?如果是的话,我可以在哪里找到FBRequest? – Gani414
是的,它是.https://developers.facebook.com/docs/reference/ios/3.1/class/FBRequest/ –