Facebook user id iPhone

I wants get Facebook access_token and user id when user login first time in application. I already get the access token but struggling with Facebook user id.

Please provide me help. how i get the user_id?

i getting the access_token in following method :

- (void)request:(FBRequest *)request didLoad:(id)result {


_isExtendingAccessToken = NO;
_requestExtendingAccessToken = nil;
NSString* accessToken = [result objectForKey:@"access_token"];
NSString* expTime = [result objectForKey:@"expires_at"];

if (accessToken == nil || expTime == nil) {
    return;
}

self.accessToken = accessToken;


NSLog(@"access token is ---------->%@",self.accessToken);

//////.........
}

Answers


try see at this link and use this code

for (NSDictionary* Info in result)
{
    NSString* uid = [Info objectForKey:@"uid"];
}

Hope will be a useful


Need Your Help

FileModeWinding and DrawPath cause odd spikes to appear

gdi+

I'm using gdiplus to "stroke" a textout. In certain circumstances, we see a "spike" appearing on the top or bottom of the graphic, and I'm not really sure why. We can minimize this by adjusting s...

xbee and arduino in mesh network

api arduino arduino-uno xbee node-xbee

I'm working on aproject with xbee(s2) and Arduino UNO , My plan is to create a mesh sensor network from 5 nodes , each node consist of xbee connect to Arduino through xbee shield, and number of sen...