我可以使用代码在朋友的墙上张贴图片
-(void)PostToBuddyWallWithText:(NSString *)strMessage
{
NSMutableDictionary *postVariablesDictionary = [[NSMutableDictionary alloc] init];
[postVariablesDictionary setObject:@"100003146964353" forKey:@"from"];
[postVariablesDictionary setObject:strMessage forKey:@"message"];
[postVariablesDictionary setObject:@"http://www.xyz.com/graphics/best-friends/best-friends24.gif" forKey:@"picture"];
AppDelegate *objAppDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
if (objAppDelegate.objFacebook.isSessionValid == YES)
{
[objAppDelegate.objFacebook requestWithGraphPath:[NSString stringWithFormat:@"%@/feed/",self.strfacebook_Id] andParams:postVariablesDictionary andHttpMethod:@"POST" andDelegate:nil];
NSLog(@"message: %@",postVariablesDictionary);
[postVariablesDictionary release];
UIAlertView *facebookAlter=[[UIAlertView alloc] initWithTitle:@"Message" message:@"Posted successfully on facebook" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil, nil];
[facebookAlter show];
[facebookAlter release];
[self dismissModalViewControllerAnimated:YES];
} else {
[objAppDelegate FacebookLogin];
}
}
但我无法找到将我拥有的图像作为 UIImage 发布的方法。这可以做到吗?