title: Problems passing Facebook friend name into text field
body: <p>I'm working on selecting a facebook friend. I'd want to display the facebook friend's name in the textfield that launches the facebook friend picker.  </p>
  
  <p>Thanks!</p>
  
  <p>Also, is there a difference between grabbing the users string name and selecting a friend to send an object to? Because that's what the users will be doing. So, I'll need to display the string value of the user's name, but I'll also have to associate an object with that user. </p>
  
  <pre><code>-(IBAction)cancelList;
  -(IBAction)submitList;
  -(IBAction)datePicker;
  
  @property (strong, nonatomic) IBOutlet UITextField *listFieldText;
  @property (strong, nonatomic) IBOutlet UITextField *dateFieldText;
  @property (strong, nonatomic) IBOutlet UITextField *wallPostText;
  @property (strong, nonatomic) IBOutlet UITextField *friendsName;
  @property (retain, nonatomic) UIDatePicker *pick;
  @property (strong, nonatomic) UIImage *profilePic;
  
  @property (retain, nonatomic) PF_FBFriendPickerViewController *friendPickerController;
  </code></pre>
  
  <p>Implementation:</p>
  
  <pre><code>- (void)textFieldDidBeginEditing:(UITextField *)sender
  {
      sender.delegate = self;
      if([sender isEqual:dateFieldText])
      {
          UIBarButtonItem *doneButton = [[UIBarButtonItem alloc]
                                         initWithTitle:@"Save Date"
                                         style:UIBarButtonItemStyleDone
                                         target:self
                                         action:@selector(datePicker)];
          self.navigationItem.rightBarButtonItem = doneButton;
          pick = [[UIDatePicker alloc] init];
          [pick setFrame:CGRectMake(0,200,320,120)];
          //[pick addTarget:self action:@selector(done) forControlEvents:UIControlEventValueChanged];
          dateFieldText.delegate = self;
          dateFieldText.inputView = pick;
      }
      else if ([sender isEqual:friendsName])
      {
          NSLog(@"Pick a friend!");
  
          if (self.friendPickerController == nil) {
              // Create friend picker, and get data loaded into it.
              self.friendPickerController = [[PF_FBFriendPickerViewController alloc] init];
              self.friendPickerController.title = @"Select Friends";
              self.friendPickerController.delegate = self;
              self.friendPickerController.allowsMultipleSelection = NO;
          }
          [self.friendPickerController loadData];
          [self.friendPickerController clearSelection];
          [self presentModalViewController:self.friendPickerController animated:YES];
  
      }
      else{
          UIBarButtonItem *submitButton = [[UIBarButtonItem alloc]
                                           initWithTitle:@"Done"
                                           style:UIBarButtonItemStyleDone
                                           target:self
                                           action:@selector(submitList)]; //change this
  
  
            self.navigationItem.rightBarButtonItem = submitButton;
  
          }
      }
  
  -(void)updateFriendTextField:(NSString*)subtitle
  {
      friendsName.text = subtitle;
  }
  
  /*
  -(void)updateSelections
  {
      NSString* friendsSubtitle = @"Selected friends";
      id&lt;PF_FBGraphUser&gt; friend = [self.selectedFriends objectAtIndex:0];
      friendsSubtitle = friend.name;
      [self updateFriendTextField:friendsSubtitle];
  
      //[self handlePickerDone];
  }
  */
  
  -(void)friendPickerViewControllerDataDidChange:(PF_FBFriendPickerViewController *)friendPicker {
      NSLog(@"Current friend selections: %@", friendPicker.selection); 
  
  }
  
  - (void)dealloc
  {
      friendPickerController.delegate = nil;
  }
  
  - (void)facebookViewControllerCancelWasPressed:(id)sender
  {
      [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
      NSLog(@"Friend selection cancelled.");
      //[self handlePickerDone];
  }
  
  - (void)facebookViewControllerDoneWasPressed:(id)sender
  {
  
      NSLog(@"Done was pressed.");
      //[self updateSelections];
      [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
  }
  </code></pre>