Guest User

Untitled

a guest
Jun 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. GTLRPeopleServiceQuery_PeopleGet *getDataQuery =
  2. [GTLRPeopleServiceQuery_PeopleGet queryWithResourceName: @"people/me"];
  3. [getDataQuery setPersonFields:@"genders,birthdays"];
  4.  
  5. GTLRPeopleServiceService *gService = [[GTLRPeopleServiceService alloc] init];
  6. [gService setAPIKey:@"APIKEYHERE"];
  7. [gService executeQuery: getDataQuery delegate:self didFinishSelector:@selector(getCreatorFromTicket:finishedWithObject:error:)];
  8.  
  9.  
  10. -(void)getCreatorFromTicket:(GTLRServiceTicket *) ticket finishedWithObject: (GTLRPeopleService_Person *) finishedWithObject error: (NSError *)error
  11. {
  12. if (error != nil) {
  13. NSLog(@"Error is %@", error.localizedDescription);
  14. }
  15.  
  16. NSLog(@"Response is %@", finishedWithObject);
  17. }
  18.  
  19. The request does not have valid authentication credentials.
Add Comment
Please, Sign In to add comment