Twitter Login in iOS App using swift 4.

Updated 26 October 2021

Save

Twitter Login in iOS App using swift 4.

Most of the time we provide the social login in app that will help user to login in app fast & smooth .

Here i have taken example of Twitter .

1: First try to follow this steps and add their SDK in App.

https://github.com/twitter/twitter-kit-ios/wiki/Installation

2: After that Go to Appdelgate.swift file and add this:

Now add this method also in Appdelegate.swift file.

3: Now write the code that will fetch user email & Name .

for this:

 

4: Now you have done all the required things for fetching the user credential in App

5: Now last important things that open the twitter developer site and select your app (where you have registered your iOS app)

1.1: Now you have  to call back URL for App.

2.1: To get the call back URL

a: open info.plist file and copy URL schemes.

it look like this.

copy this ” twitterkit-js5zHyDKTz2RTthfgV5xl9icA”

Note: ” twitterkit- Your Consumer Key”

 

and Now open your twitter developer account & select your app.

3.1: edit the App account .

4.1: go to callback URLs section and paste it.

like that.

 

5.1:Now save this.

6: Now you are able to fetch the user data without any issue.

 

 

 

if you have any issue regarding twitter login than freely to ask , we will wait for your valuable feedback

 

 

 

 

 

 

 

 

 

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


14 comments

  • Priya gupta
    • kunal prasad (Moderator)
  • Tony Fotherby
    • kunal prasad (Moderator)
  • Sonu verma
    • kunal prasad (Moderator)
    • Nicholas Marriotti
      • kunal prasad (Moderator)
        • Tarang Gupta
  • Nikunj
  • Arjun
  • Sorabh Kumar
    • jitendra kumar (Moderator)
  • taojian
  • Start a Project


      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home