【问题标题】:Problem getting friends events via FB connect通过 FB 连接获取好友事件的问题
【发布时间】:2011-03-09 10:28:07
【问题描述】:

我正在尝试通过 Graph API 获取用户的事件和他的朋友事件。

首先,除了为每个好友发送新查询之外,还有其他选项可以获取所有好友事件吗? (即使它存在于其他协议中)

for(NSDictionary *friend in friends) {

        NSLog(@"sending events for %@", [friend objectForKey:@"id"]);
        [facebook requestWithGraphPath:
         [NSString stringWithFormat:@"%@/events&since=today&until=tomorrow&limit=10", [friend objectForKey:@"id"]]
                           andDelegate:self];
    }

其次,我可以获取用户的所有事件,而不仅仅是他标记的出席状态吗?

谢谢!

【问题讨论】:

    标签: iphone ios facebook fbconnect


    【解决方案1】:

    首先你必须参加Extended Permission 的user_events 和好友事件。至于您的第二部分问题,您可以查询event_member 表以获取状态。希望它会工作

    【讨论】:

    • 谢谢,但我的意思是对于某个用户,我想获取他所有朋友的事件。现在我正在为每个人发送请求,这真的很慢。是否有任何选择在一个请求中获取信息或更有效但这种方法?
    • 您是如何发送请求的?您能否编辑您的问题并提供您的代码?
    • 是的,friends 数组包含之前查询的所有朋友,然后:for( NSDictionary *friend in friends ) { NSLog(@"sending events for %@", [friend objectForKey:@"id"]); [facebook requestWithGraphPath: [NSString stringWithFormat:@"%@/events&since=today&until=tomorrow&limit=10", [friend objectForKey:@"id"]] andDelegate:self]; }
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-27
    • 1970-01-01
    • 2012-01-04
    • 1970-01-01
    相关资源
    最近更新 更多