Latest | 0.0.1 |
---|---|
Homepage | https://github.com/gekitz/GKTwitterAccess |
License | MIT |
Platforms | ios 7.0, requires ARC |
Dependencies | GKBlocks/UIActionSheet |
Frameworks | Accounts, Social |
Authors |
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
GKTwitterAccessErrorCodeNoTwitterAccounts
as 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
Latest podspec
{ "name": "GKTwitterAccess", "version": "0.0.1", "summary": "Tries to access Twitter accounts and shows an UIActionSheet if the user has more than one", "description": " This addition tries to access the Twitter accounts a user has definedn in the Settings.app. If the user has multiple accounts, an `UIActionSheet`n is presented and the user can pick one account, otherwise if only one accountn is defined, said account is returned in the completion block.n", "homepage": "https://github.com/gekitz/GKTwitterAccess", "screenshots": "https://raw.githubusercontent.com/gekitz/GKTwitterAccess/master/Files/TwitterAccessSample.gif", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "Georg Kitz": "[email protected]" }, "social_media_url": "http://twitter.com/gekitz", "platforms": { "ios": "7.0" }, "source": { "git": "https://github.com/gekitz/GKTwitterAccess.git", "tag": "0.0.1" }, "source_files": [ "Classes", "Classes/**/*.{h,m}" ], "exclude_files": "Classes/Exclude", "frameworks": [ "Accounts", "Social" ], "requires_arc": true, "dependencies": { "GKBlocks/UIActionSheet": [ "~> 0.0.1" ] } }
Sun, 06 Mar 2016 21:22:04 +0000