コードを使用して友人の壁に画像を投稿できます
-(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として持っている画像を投稿する方法を見つけることができません。これはできますか?