OK managed to generate an answer from the strategy file from the passport-facebook-token
This requires:
http: // url? access_token = [access token]
From iOS, I just tested this with:
NSString *fbAccessToken = [[[FBSession activeSession] accessTokenData] accessToken]; NSLog(@"This is token: %@", fbAccessToken); NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://myapi.url.com/auth/facebook?access_token=%@",fbAccessToken]]; NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:url]; [req setHTTPMethod:@"GET"]; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSURLResponse *res; NSError *err; [NSURLConnection sendSynchronousRequest:req returningResponse:&res error:&err]; if (!err) { NSLog(@"The user is logged in on the server side too"); } else { NSLog(@"Error occurred. %@", err); } });
Hope this helps someone else.
source share