如何通过iPhone应用程序向Facebook中的人发送朋友请求?

时间:2011-10-20 11:34:10

标签: iphone facebook-graph-api

有没有办法通过iPhone应用程序发送好友请求?如果有,请帮助我。我在网上搜索过,但我没有得到解决方案。

我收到以下代码发送应用请求不发送好友请求

 NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:4];
[variables setObject:[NSString stringWithFormat:@"Come and join XYZ App."] forKey:@"message"];
[variables setObject:@"url" forKey:@"picture"];       
[variables setObject:@"Hello" forKey:@"name"];
[variables setObject:@"Description" forKey:@"description"];

[_facebook requestWithGraphPath:[NSString stringWithFormat:@"/%@/feed",facebook_user_id] 
                      andParams:variables 
                  andHttpMethod:@"POST"
                    andDelegate:self];

请帮帮我。

2 个答案:

答案 0 :(得分:0)

没有用于发送好友请求的API,这必须使用Facebook的一个接口

来完成

答案 1 :(得分:0)

Facebook Graph API不支持添加好友。您可以从Facebook个人资料中获取朋友列表,但不能从Facebook Graph API发送朋友请求。