Идентификатор пользователя Twitter в iOS 5

Я использую следующий код для получения сведений о пользователе из Twitter в iOS 5.

if ([TWTweetComposeViewController canSendTweet]) 
{
    // Create account store, followed by a Twitter account identifer
    account = [[ACAccountStore alloc] init];
    ACAccountType *accountType = [account accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];

    // Request access from the user to use their Twitter accounts.
    [account requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) 
     {
         // Did user allow us access?
         if (granted == YES)
         {
             // Populate array with all available Twitter accounts
             arrayOfAccounts = [account accountsWithAccountType:accountType];
             [arrayOfAccounts retain];

             // Populate the tableview
             if ([arrayOfAccounts count] > 0) 
                 [self performSelectorOnMainThread:@selector(updateTableview) withObject:NULL waitUntilDone:NO];
         }
     }];
}

//

-(void)updateTableview
{

    numberOfTwitterAccounts = [arrayOfAccounts count];
    NSLog(@"Twiter details-- %@",[arrayOfAccounts objectAtIndex:0]);

}

В моей консоли NSLog я использую получение вывода следующим образом:

Twiter details-- type:com.apple.twitter  
identifier: E8591841-2AE0-4FC3-8ED8-F286BE7A36B0
accountDescription: @Sadoo55
username: sadukoyghdkwed@gmail.com
objectID: x-coredata://F8059811-CFB2-4E20-BD88-F4D06A43EF11/Account/p8
enabledDataclasses: {(
)}
properties: {
  "user_id" = 308905856;
}
parentAccount: (null)
owningBundleID:com.apple.Preferences

Я хочу получить "user_id" отсюда. Как я могу получить user_id (например, 308905856)?

17
задан 10 revs, 6 users 33% 12 February 2012 в 21:31
поделиться

0 ответов