Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here use these delegate methods to get the picture of user.</p> <p>When you create session you will get the delegate method called didLogin</p> <pre><code>- (void)session:(FBSession*)session didLogin:(FBUID)uid { isLoginSuccessful = TRUE; if(isLoginCanceled == FALSE) { [self fetchUserDetails]; } } - (void)sessionDidNotLogin:(FBSession*)session { isLoginSuccessful = FALSE; isLoginCanceled = TRUE; } - (void)sessionDidLogout:(FBSession*)session { isLoginSuccessful = FALSE; isLoginCanceled = TRUE; } - (void)fetchUserDetails { NSString* fql = [NSString stringWithFormat: @"select name,sex,pic from user where uid == %lld", _session.uid]; NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"]; [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params]; } </code></pre> <p><strong>after calling the method requestWithDelegate you'll get response in this method if succeed</strong></p> <pre><code>- (void)request:(FBRequest*)request didLoad:(id)result { if ([request.method isEqualToString:@"facebook.fql.query"]) { NSArray* users = result; NSDictionary* user = [users objectAtIndex:0]; NSLog(@"User Details %@",user); if(fbUserDetails == nil) { self.fbUserDetails = [[NSDictionary alloc] initWithDictionary:user]; } if(isLoginSuccessful) { NSString *fbUid = [NSString stringWithFormat:@"%lld",_session.uid]; self.FBUserID = fbUid; [_delegate loggedInFaceBookSuccessfully:fbUid]; } } } </code></pre> <p>You'll get all the details in json format you can see in GDB</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload