我想将文本发布到朋友墙,但使用此代码存在一些问题...
-(IBAction)PostToBuddyWall
{
NSMutableDictionary *postVariablesDictionary = [[NSMutableDictionary alloc] init];
[postVariablesDictionary setObject:@"LOL" forKey:@"name"];
[postVariablesDictionary setObject:@"helllo" forKey:@"message"];
Facebook *fb = [((AppDelegate*)[[UIApplication sharedApplication] delegate]) fbInstance];
[fb requestWithGraphPath:[NSString stringWithFormat:@"%@/feed",self.fbFriendsInvited] 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 dismissViewControllerAnimated:YES completion:nil];
}
如果你有请给建议...谢谢!