I see that the access token is available in the Facebook object, but I don't see a Facebook user Id.
I could make a graph request to "me" to get the Facebook Id, but I'd prefer not to make the extra api call.
The simplest way to get a copy of the User Profile object is to access the /me endpoint: FB. api('/me', function(response) { }); This will this will return the users name and an ID by default.
The Facebook SDK enables: Facebook Login - Authenticate people with their Facebook credentials. Share and Send dialogs - Enable sharing content from your app to Facebook. App Events - Log events in your application.
The Facebook SDK includes code to access Apple's Advertising Identifier (IDFA), but that code is only executed in certain situations.
There is an easy way to get this these days; assuming you already have a FBSession
open, you could just do this:
[FBRequestConnection startForMeWithCompletionHandler:
^(FBRequestConnection *connection, id result, NSError *error)
{
NSLog(@"facebook result: %@", result);
}];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With