本文介绍了Facebook API:在朋友墙上张贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在用户好友墙上发布内容,而无需先获得所有好友(这样您就可以获得好友 ID)?
Is it possible to post something on a users friends wall, without having to get all the friends first (So you can get the friend id)?
[facebook requestWithGraphPath:@"me/friends" andDelegate:self];
推荐答案
看到这个
-(IBAction)PostToBuddyWall
{
NSMutableDictionary *postVariablesDictionary = [[NSMutableDictionary alloc] init];
[postVariablesDictionary setObject:@"LOL" forKey:@"name"];
[postVariablesDictionary setObject:self.postTextView.text forKey:@"message"];
[objDelegate.facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/feed",friendId] 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];
}
这篇关于Facebook API:在朋友墙上张贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!