CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

GKTwitterAccess 0.0.1

GKTwitterAccess 0.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Georg Kitz.




Description

This addition tries to access the Twitter accounts a user has defined in the Settings.app. If the user has multiple accounts, an UIActionSheet is presented and the user can pick one account, otherwise if only one account is defined, said account is returned in the completion block.

You simply have to call following method

@interface UIViewController (TwitterAccess)
- (void)authorizeTwitterAccount:(TRTwitterAuthorizationFinishedBlock)finishedBlock;
@end

If the user has no Twitter accounts defined in the Settings.app we return GKTwitterAccessErrorCodeNoTwitterAccountsas error.

If the user presses cancel while the UIActionSheet is shown, we return GKTwitterAccessErrorCodeUserCancelledActionSheet as error.

Finally if any other error occurs during the authorization process, we return the error we get from the framework.

Possible Scenarios

No Twitter Accounts -> Error One/More Twitter Accounts -> Access Denied -> Error One Twitter Account -> Access Granted -> Account is returned More Twitter Accounts -> Access Granted -> UIActionSheet is shown -> Picked Account is returned

Author

Georg Kitz, @gekitz