title: how to code to get facebook friend list in ios7
body: <p>Hi am using following code</p>
  
  <pre><code>-(IBAction)FacebookFriendBtnClk:(id)sender
  {
  ACAccountStore *accountStore = [[ACAccountStore alloc] init];
  __block ACAccount *facebookAccount = nil;
  
  ACAccountType *facebookAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
  
  // Specify App ID and permissions
  NSDictionary *options = @{
                            ACFacebookAppIdKey: @"743178525726332",
                            ACFacebookPermissionsKey: @[@"publish_stream", @"publish_actions",@"read_friendlists"],
                            ACFacebookAudienceKey: ACFacebookAudienceFriends
                            };
  
  [accountStore requestAccessToAccountsWithType:facebookAccountType
                                        options:options completion:^(BOOL granted, NSError *error)
   {
       if (granted)
       {
           NSArray *accounts = [accountStore accountsWithAccountType:facebookAccountType];
  
           facebookAccount = [accounts lastObject];
       }
       else {
  
           NSLog(@"error.localizedDescription======= %@", error.localizedDescription);
       }
  
   }];
  
  NSArray *accounts = [accountStore accountsWithAccountType:facebookAccountType];
  facebookAccount = [accounts lastObject];
  
  //NSString *acessToken = [NSString stringWithFormat:@"%@",facebookAccount.credential.oauthToken];
  //NSDictionary *parameters = @{@"access_token": acessToken};
  
  NSDictionary *param=[NSDictionary dictionaryWithObjectsAndKeys:@"picture,id,name,link,gender,last_name,first_name,username",@"fields", nil];
  
  NSURL *feedURL = [NSURL URLWithString:@"https://graph.facebook.com/me/friends"];
  SLRequest *feedRequest = [SLRequest
                            requestForServiceType:SLServiceTypeFacebook
                            requestMethod:SLRequestMethodGET
                            URL:feedURL
                            parameters:param];
  feedRequest.account = facebookAccount;
  [feedRequest performRequestWithHandler:^(NSData *responseData,
                                           NSHTTPURLResponse *urlResponse, NSError *error)
   {
       if(!error)
       {
           id json =[NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&amp;error];
  
           NSLog(@"Dictionary contains data: %@", json );
           if([json objectForKey:@"error"]!=nil)
           {
               //[self attemptRenewCredentials];
           }
           dispatch_async(dispatch_get_main_queue(),^{
               //nameLabel.text = [json objectForKey:@"username"];
           });
       }
       else{
           //handle error gracefully
           NSLog(@"error from get%@",error);
           //attempt to revalidate credentials
       }
   }];
  </code></pre>
  
  <p>}</p>
  
  <p>Am getting following error in log</p>
  
  <pre><code>  2014-04-04 16:49:04.098 ImageProcessingDemo[4791:3c0b] error.localizedDescription======= (null)
    2014-04-04 16:49:34.964 ImageProcessingDemo[4791:3f07] Dictionary contains data: {
  error =     {
      code = 2500;
      message = "An active access token must be used to query information about the current user.";
      type = OAuthException;
      };
  }
  </code></pre>