Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

quique123

macrumors newbie
Original poster
Jul 28, 2009
6
0
Im using AddressBook to fetch data from it and populate a VController. Ive gotten most of the values so far, names, email, telephone etc. But Im stumped with the twitter user name. How would I get that string from AB and put it into a variable?

I read the ABPerson reference and found that:

Code:
Social Profile Keys
The keys used to specify the different fields in a kABPersonSocialProfileProperty property (a multivalue property of type kABMultiDictionaryPropertyType). Neither developers nor users can add more keys.

const ABPropertyID kABPersonSocialProfileProperty;
const CFStringRef kABPersonSocialProfileURLKey;
const CFStringRef kABPersonSocialProfileServiceKey;
const CFStringRef kABPersonSocialProfileUsernameKey;
const CFStringRef kABPersonSocialProfileUserIdentifierKey;
So does this mean i need to say:
[code]
const ABPropertyID kABPersonSocialProfileProperty = twitter
and then

Code:
myName = const CFStringRef kABPersonSocialProfileUsernameKey

which would be a dictionary so i guess it would be

Code:
if (kABPersonSocialProfileProperty = twitter)
objectForKey:kABPersonSocialProfileUsernameKey
Something like that?
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.