Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7493621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:05:27+00:00 2026-05-29T17:05:27+00:00

How to get the username value only from the addressbook, when selecting a twitter

  • 0

How to get the username value only from the addressbook, when selecting a twitter detail of contact

if ( property == kABPersonSocialProfileProperty) {

        ABMultiValueRef multi = ABRecordCopyValue(person, property);


        for (CFIndex i = 0; i < ABMultiValueGetCount(multi); i++) {

            CFStringRef socialLabel = ABAddressBookCopyLocalizedLabel(ABMultiValueCopyLabelAtIndex(multi, identifier));

            CFStringRef social = ABMultiValueCopyValueAtIndex(multi, i);

            NSDictionary* personaddress =(NSDictionary*) ABMultiValueCopyValueAtIndex(multi, i);        

            NSString*twitterdetails = [personaddress valueForKey:(NSString *)kABPersonSocialProfileServiceTwitter];
            NSLog(@"%@ twitterdetails",twitterdetails);  


            NSString *aString = (NSString *)social;


            NSLog(@"%@ aString",aString);
        }

I am getting the result as below

{
    service = twitter;
    url = "http://twitter.com/manoas2136";
    username = manoas2136;
} aString

please tell me how to get only the username from the above result set

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:05:27+00:00Added an answer on May 29, 2026 at 5:05 pm

    try this code

      NSDictionary* personalDetails = [NSDictionary dictionaryWithDictionary:(NSDictionary*)ABMultiValueCopyValueAtIndex(multi, i)];
      NSString* aString = [personalDetails valueForKey:@"username"];
      NSLog(@"%@ aString",aString);
    

    result manoas2136 aString

    you converted the NSDictionary value in to string so it clubbed all result of NSDictionary to NSString so you extract only username by using valueForKey:

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I get the username from the webservice my Webservice is configured under
How to get user roles from Membership provider? Suppose I have a username and
users can sign up to my site and get a standard url (username.teamgeisthq.com) from
from django.contrib.auth.models import User u = User.objects.get(username='test') user.password u'sha1$c6755$66fc32b05c2be8acc9f75eac3d87d3a88f513802 Is reversing this password encryption
From this question, I know you can use SecKeychainFindGenericPassword without a username value. It
On iPhone, how do I show a login screen to get username and password
public class Account { public string Username { get { return Username; } set
I have an action that relies on User.Identity.Name to get the username of the
In an aspx page I get the Windows username with the function Request.LogonUserIdentity.Name .
I get a generic failure when I try to run: saslpasswd2 username This was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.