【问题标题】:How to fetch online Facebook friends in iPhone using Graph API?如何使用 Graph API 在 iPhone 中获取在线 Facebook 好友?
【发布时间】:2010-09-08 06:59:23
【问题描述】:

我想使用 Graph API 获取 Facebook 用户的在线朋友,但我无法从网上找到任何帮助。

我可以使用 Graph API 获取用户的朋友,但我想知道当前在线的人,以及有关用户朋友的更多信息,例如图片 URL、出生日期等。

我只能使用以下代码行获取用户朋友的 ID 和姓名

[_facebook requestWithGraphPath:@"me/friends" andDelegate:self];

谁能帮帮我。

【问题讨论】:

    标签: ios facebook-graph-api facebook-ios-sdk


    【解决方案1】:

    目前无法使用图形 API。

    根据主题上的facebook dev forum thread,可以通过调用网站本身在 AJAX 请求中使用的 php 脚本或使用 XMPP 来执行此操作

    【讨论】:

      【解决方案2】:
      if ([result isKindOfClass:[NSDictionary class]])
      {
          NSLog(@"count : %d ", [result count]);
          NSArray* resultArray = [result allObjects];
      
          NSLog(@"count : %d ", [result count]);
          result = [resultArray objectAtIndex:0];
      
          NSLog(@"count : %d ", [result count]);
          result = [result objectAtIndex:0];
      
          [self.label setText:[result objectForKey:@"name"]];
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-10-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多