Facebook API:贴在朋友墙上 [英] Facebook API: Post on friend wall

查看:83
本文介绍了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:贴在朋友墙上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆