i want to make app that login with twitter so i want to fetch some data from twitter account such as id,username, and email.
i have an api that take the 3 parameters and return success so i want to get the 3 parameters.
i have a custom button and i want when i tap this button i want to get twitter page and after i write username and password i want to fetch data
i configure twitter and fabric account.
i only want a function to fetch this data for me.
thanks in advance
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Fabric.with([TWTRTwitter.self])
// twitter configration
TWTRTwitter.sharedInstance().start(withConsumerKey:"----------", consumerSecret:"-------")
return true
}
2
Answers
You can fetch data from twitter by using following method:
Hope this will help you.
Declare variable:
function for get user Info:
Hope It’s helps to you.!!