How to add Twitter Login to your App How to add Twitter Login to your App

How to add Twitter Login to your App

Twitter login feature will allow users to easily user their Twitter account to create an in App account in your app.

You will need a Free twitter developer account to link your Twitter app to your Apps Creator apps. Free Twitter developer account only allow one app to be setup. If you have a paid account already, you can create a new app their.

 

Step 1: SignUp or Login to the Twitter Developer portal.

Step 2: Create a new project in your developer dashboard.

x1.png

Step 3: Follow the on screen instruction to create a new project and App.

x2.png

x3.png

x4.png

x5.png

Step 4: Once your app is created, you will be shown your App Key, Secret and Bearer Token. Copy these and keep them securely stored. We will use these later.

step4.png

Step 5: Now click on App Settings to setup your App.

step5.png

Step 6: Under App Settings, we will now set up User authentication. Click on Set up, under user authentication.

s6.png

Step 7: On this page we will appropriate permissions. Callback URLs and other items to our Twitter app.

For App Permissions, select Read option. Make sure you turn on "Request email from users".

Select Native for the type of app.

s7.png

Under App Info:

a. Add your marketing Website link.

b. Add your Terms of Service and Privacy Policy links.

c. Head towards the next step to fill Call back URLs.

 

s7a.png

Step 8: Call back URLs.

We need to add two call back URLs. One will be user for the iOS app and one will be user for the Android app.

To create a call back URL for the iOS app we will need the API key obtained in Step 4 of this article. We will need to provide a schema as a call back URL. The schema will be in this format twitterkit-<API KEY>:// here the <API Key> will be replaced by your App's API Key. FOr example if your Twitter App API key is CWlp4H36K1zI7a6vA5J618fgW then the resulting schema will be

twitterkit-CWlp4H36K1zI7a6vA5J618fgW://

add this schema as Call back URL.

s8.png

Now we will create a call back URL for our Android App. We will user Firebase Authentication service to create a Twitter Login for our Android apps.

Step 8a: Open your Firebase Console and select the existing project that has your Android app registered.

Step 8b: Select All Products from the left menu.

s8b.png

Step 8c: From the list select "Authentication" and click on "Get Started".

s8c.png

s8c1.png

Step 8d: Under Sign in providers, select Twitter.

s8d.png

Step 8e: Add your Twitter API key and secret obtained in step 4 of this article. Grab the callback URL shown here and add it to your Twitter app authentication settings. Save the form.

s8e.png

s8e1.png

Step 8f: Now in Firebase, Navigate to Project Settings and select your pre-registered Android app:

s8f.png

Step 8g: Grab your SHA1 hash from the Keystore information that your added to your Android Platform page in Apps Creator. Add the SHA1 hash under SHA Certificate Fingerprints.

s8g.png

Step 9: We are done with the setup on Firebase and can move back to Twitter Developer account. Save the authentication form after adding all the information as stated in Step 7 and 8.

Step 10: Open Apps Creator Dashboard and Navigate to Manage >> Social Integrations. Click on the "+" icon and select Twitter ("X" icon). Add the API key and Secret obtained in Step 4 of this article and save.

s10.png

 

Congratulations! you have successfully added Twitter login in Apps Creator. If you face any difficulty following the steps in this article, please reach out to appsupport@zype.com.

Was this article helpful?

0 out of 0 found this helpful