Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

added Facebook login

  • Loading branch information...
1 parent 70f515c commit 41e8b77146bf16b01dc3b8c085368cbf4a752d27 @rodsimpson rodsimpson committed
Showing with 12 additions and 0 deletions.
  1. +3 −0  UGAPI/UGClient.h
  2. +9 −0 UGAPI/UGClient.m
3  UGAPI/UGClient.h
@@ -74,6 +74,9 @@ set the response limit in UGQuery as well.
// log in with the given username and PIN value
-(UGClientResponse *)logInUserWithPin: (NSString *)userName pin:(NSString *)pin;
+// log in user with Facebook token
+-(UGClientResponse *)logInUserWithFacebook: (NSString *)facebookToken;
// log in as the administrator of the application. Generally used for applications
// that have an "administrator" feature. Not the sort of thing you want normal
// users doing.
9 UGAPI/UGClient.m
@@ -678,6 +678,15 @@ -(UGClientResponse *)logInUserWithPin: (NSString *)userName pin:(NSString *)pin
return [self logIn:@"pin" userKey:@"username" userValue:userName pwdKey:@"pin" pwdValue:pin];
+-(UGClientResponse *)logInUserWithFacebook: (NSString *)facebookToken
+ NSMutableString *url = [self createURL:@"auth/facebook"];
+ UGQuery *query = [[UGQuery alloc] init];
+ [query addURLTerm:@"fb_access_token" equals:facebookToken];
+ [self appendQueryToURL:url query:query];
+ return [self httpTransaction:url op:kUGHTTPGet opData:nil];
-(UGClientResponse *)logInAdmin: (NSString *)adminUserName secret:(NSString *)adminSecret
return [self logIn:@"client_credentials" userKey:@"client_id" userValue:adminUserName pwdKey:@"client_secret" pwdValue:adminSecret];

0 comments on commit 41e8b77

Please sign in to comment.
Something went wrong with that request. Please try again.