title: AddressBook ABPerson Twitter Social Profile
body: <p>Have you ever tried to get data fields from the address book and ran into the wonderful world of ABPerson reference only to find it reads like the blueprints to a space rocket?</p>
  
  <p>I've gotten so far but I still need help getting just the Twitter username key &amp; value:</p>
  
  <pre><code>//I tried this but I can't seem to get the if statement to work
  ABMutableMultiValueRef socialMulti = ABRecordCopyValue(person, kABPersonSocialProfileProperty);
  NSMutableDictionary *mySocialDict = [NSMutableDictionary dictionaryWithCapacity:ABMultiValueGetCount(socialMulti)];
  NSLog(@"entering social dict of count %ld", ABMultiValueGetCount(socialMulti));
  for (CFIndex i = 0; i &lt; ABMultiValueGetCount(socialMulti); i++) { 
      CFStringRef socialLabel = ABAddressBookCopyLocalizedLabel(ABMultiValueCopyLabelAtIndex(socialMulti, i));
      CFStringRef social = ABMultiValueCopyValueAtIndex(socialMulti, i); 
      if ([(__bridge NSString*)socialLabel isEqualToString:@"twitter"]) {
          NSLog(@"we got a twitter");
      }
      [mySocialDict setObject:(__bridge NSString*)social forKey:(__bridge NSString*)socialLabel];
      NSLog(@"social is %@",social);
  
      CFRelease(social);
      CFRelease(socialLabel);
  </code></pre>
  
  <p>}</p>
  
  <p> 
  I'm actually just interested in the twitter username.  I know I could get it from the dictionary I created but I want to get it directly.  I plan to eliminate the NSDictionary step anyway.</p>