This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
Angel S. Moreno edited this page Jun 10, 2015
·
11 revisions
The Twitter provider comes in two flavors: system and web.
Both Twitter providers require the following parameters:
consumer_key
consumer_secret
let twitterConfiguration = [
"consumer_key" : "",
"consumer_secret" : ""
]
SimpleAuth.configuration()["twitter"] = twitterConfiguration
SimpleAuth.configuration()["twitter-web"] = twitterConfiguration
// System
SimpleAuth.authenticateWithProvider("twitter") { responseObject, error in }
// Web
SimpleAuth.authenticateWithProvider("twitter-web") { responseObject, error in }
The system provider interacts with Accounts.framework
and Social.framework
to provide authentication. Install the system provider by adding pod 'SimpleAuth/Twitter'
to your Podfile
. Its provider type is twitter
. If multiple accounts are present, SimpleAuth will present a UIActionSheet
with the options.
The web provider users a web view to authenticate the user. Install the web provider by adding pod 'SimpleAuth/TwitterWeb'
to your Podfile
. Its provider type is twitter-web
. This provider presents a web view controller that allows the user to authenticate.