IOS Facebook Authentication Using node.js passport-facebook-token
OK managed to work out the answer from the strategy file from passport-facebook-token
It requires:
http://URL?access_token=[access token]
From IOS i simply 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.