通过iOS应用程序读取邮箱或用户节点

时间:2015-05-22 12:56:35

标签: ios facebook-graph-api inbox facebook-graph-api-v2.3

为什么此代码在获取收件箱时出错?

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                              initWithGraphPath:@"/me/inbox"
                              parameters:@{@"fields":@"inbox"}
                              HTTPMethod:@"GET"];

登录控制台时出错:

{
    code = 100;
    message = "You can only access the \"inbox\" connection for the current user.";
}

好像如果我使用此代码来获取收件箱,则会将其提取到收件箱:

FBSDKGraphRequest *request =[[FBSDKGraphRequest alloc] initWithGraphPath:@"me"
                                                          parameters:@{ @"fields" : @"inbox"}];

1 个答案:

答案 0 :(得分:0)

想出来不能传递param中的字段

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                              initWithGraphPath:@"/me/inbox?limit=50"
                              parameters:nil    
                              HTTPMethod:@"GET"];