Twitter

As shown in previous sections, Twitter has been easier to interact with than the more complex Facebook APIs, due mainly to the multiple permission hierarchy implemented with Facebook. Accessing a user’s Twitter timeline begins in the same fashion as posting new a tweet; references to ACAccountStore and ACAccountType are created.

ACAccountStore *account = [[ACAccountStore alloc] init];ACAccountType *accountType = [account accountTypeWithAccountTypeIdentifier: ACAccountTypeIdentifierTwitter];

Continuing in the same fashion as posting a new tweet, a call to requestAccessToAccountWithType: is performed on the account object. Basic error handling is also set up here.

[account requestAccessToAccountsWithType:accountType ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.