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.
Step 3: Follow the on screen instruction to create a new project and App.
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.
Step 5: Now click on App Settings to setup your App.
Step 6: Under App Settings, we will now set up User authentication. Click on Set up, under user authentication.
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.
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.
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.
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.
Step 8c: From the list select "Authentication" and click on "Get Started".
Step 8d: Under Sign in providers, select Twitter.
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.
Step 8f: Now in Firebase, Navigate to Project Settings and select your pre-registered Android app:
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.
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.
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.