0

このコードを使用して Facebook にログインします。

  [loginManager logInWithReadPermissions:@[@"email", @"public_profile", @"user_birthday", @"user_friends"]
                      fromViewController:self
                                 handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { ....   }];

そして、このコードは友達のデータを取得します:

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                              initWithGraphPath:@"me/invitable_friends"
                              parameters:@{@"fields": @"id, first_name, last_name, birthday, gender, picture, devices"}
                              HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) { ....  }];

次の情報が返ってこない理由:

  • 性別
  • デバイス
  • 誕生日
4

1 に答える 1

0

(FBSDK 4.11.0)

私のGraphRequest:

NSString *path = [NSString stringWithFormat:@"/me/friends?limit=1000"];

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                                initWithGraphPath:path
                                parameters:@{@"fields": @"id, name, link, picture.type(small), birthday, gender, devices"}
                                HTTPMethod:@"GET"];

返すデータ:

{
    devices =     (
                {
            hardware = iPhone;
            os = iOS;
        }
    );
    gender = female;
    id = 1265683xxxx273xx;
    link = "https://www.facebook.com/app_scoped_user_id/1265683xxxx273xx/";
    name = "Alexandra Szab\U00f3";
    picture =     {
        data =         {
            "is_silhouette" = 0;
            url = "https://scontent.xx.fbcdn.net/v/t1.0-1/p50x50/1007501_1223615617667435_678361396224449932_n.jpg?oh=b3c99d05faf1265683xxxx273xx&oe=57C0940";
        };
    };
}
于 2016-05-13T11:20:32.520 に答える