Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SimformSolutionsPvtLtd/SSTwitterLogin
The reusable Twitter login components for iOS is the easiest way to get data from Twitter.
https://github.com/SimformSolutionsPvtLtd/SSTwitterLogin
ios ios-swift login swift swift4 twitter twitter-api
Last synced: about 1 month ago
JSON representation
The reusable Twitter login components for iOS is the easiest way to get data from Twitter.
- Host: GitHub
- URL: https://github.com/SimformSolutionsPvtLtd/SSTwitterLogin
- Owner: SimformSolutionsPvtLtd
- License: mit
- Created: 2018-11-02T12:39:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-27T07:32:33.000Z (over 5 years ago)
- Last Synced: 2024-07-31T08:06:19.303Z (about 1 month ago)
- Topics: ios, ios-swift, login, swift, swift4, twitter, twitter-api
- Language: Swift
- Size: 34.2 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-SS-Mobile - SSTwitterLogin - The reusable Twitter login components for iOS is the easiest way to get data from Twitter. (iOS Guides / Swift)
README
# SSTwitterLogin
The reusable Twitter login components for iOS is the easiest way to get data from Twitter.# Features
• Get default user data from Twitter# Requirements
• iOS 10.0+• Xcode 9.0
# Installation
Take TwitterLoginHelper.swift, and TwitterConstant.Swift
Import two files in your project and it's done# Manually
1. Configure Twitter App Settings for iOS (https://apps.twitter.com/)
2. Download TwitterKit SDK
3. Add SDK to Project
4. Configure Xcode Project
5. Connect App Delegate Using TwitterLoginManger.swift Methods
6. Congratulations!# CocoaPods
1. Configure Twitter App Settings for iOS (https://apps.twitter.com/)
2. Install Pod ‘SSTwitterLogin’
3. Configure Xcode Project
4. Connect App Delegate Using TwitterLoginManger.swift Methods
5. Congratulations!# Usage example
**Add following in your application:didFinishLaunchingWithOptions launchOptions:**
```
TwitterLoginHelper.sharedInstance.twitterStartwith(consumerKey: "YOUR_APP_CONSUMER_KEY", consumerSecret: "YOUR_APP_CONSUMER_SECRET")
```**Add following in your application:openURL:options function**
```
return TwitterLoginHelper.sharedInstance.twitterConfigurationWithOptions(application,open: url, options:options)
```**To Do Twitter Login**
```
TwitterLoginHelper.sharedInstance.doLoginWithTwitter { (isSuccess, error) in
if isSuccess {
// Fetch LoggedIn User's Details
} else {
print(error?.localizedDescription ?? "")
TwitterLoginHelper.sharedInstance.logoutFromTwitter()
}
}
```**To Fetch LoggedIn User's Details**
```
TwitterLoginHelper.sharedInstance.getLoggedInUserDetailswith(completion: { (userData, error) in
if userData != nil {
print("UserData: \(userData?.userID ?? 0)")
} else {
print(error?.localizedDescription ?? "")
}
})
```