-1

I am getting user data using FBSDKGraphRequest in facebook login from graph..

But don't know how to get timezone & only country name from that data..

what i coded till now is as follow:

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                              initWithGraphPath:[NSString stringWithFormat:@"/%@",result.token.userID]
                              parameters:@{ @"fields" : @"id, name, email, first_name, hometown, last_name, location" }
                              HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
    [self handleRequestCompletionWithResult:result error:error];
}];

Here I am getting data in result ..!!!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Sneha
  • 880
  • 9
  • 24

1 Answers1

1

I don't know about the country, but you can get the timezone by adding timezone to the fields. All the available fields can be found here: User graph API

BTW, location field should return the country.

Community
  • 1
  • 1
Fahri Azimov
  • 11,470
  • 2
  • 21
  • 29
  • New versions for Graph User api is [this](https://developers.facebook.com/docs/graph-api/reference/v2.5/user) – Sneha Feb 09 '16 at 04:31