如何从应用程序内将照片上传到 Facebook 墙?我见过很多例子,但它们只给出了 url 的调用函数。我已经下载了 facebook 框架,但我不确定它是如何工作的。我已经看到了这个框架的示例代码,但是如何调用将图像发布到 Facebook 的方法?有人有完整的代码将照片上传到 FB 吗?
-(void)postUserInformation:(id)sender
{
UIImage *tempImage = [UIImage imageNamed:@"house2.jpg"];
NSData *data = UIImageJPEGRepresentation(tempImage, 1);
NSMutableDictionary *params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Testing Feed Dialog", @"name",
@"Feed Dialogs are Awesome.", @"caption",
@"Check out how to use Facebook Dialogs.", @"description",
@"http://www.example.com/", @"link",
data, @"picture",
nil];
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[[delegate facebook] dialog:@"feed"
andParams:params
andDelegate:self];
}