You are here:   Table of contents / App Content / Facebook And Twitter

Twitter

Add a Twitter section in your application or set up authentication using your Twitter account (only if you have activated the Authentication add-on):

1. Apply for a Twitter developer account
2. Create your Twitter app
3. Set your Twitter app
4. Set your section or authentication settings in your back office


1

Apply for a Twitter developer account

1. Go to https://developer.twitter.com/en/apply-for-access
2. Click the avatar to Sign in to your Twitter account at the top right-hand corner of the page to log in.
3. Click the button "Apply for a developer account"


Basic Info:
1. Select what best describes you, then click "Get started"
2. Add a valid phone number if it isn't already done for your Twitter account
3. Fill in your basic info and click "Next"


Team profile:
If you selected Professional, fill in your team profile and click "Next"
If you selected Hobbyist or Academic skip this step.


Intended use:
In your words
"In English, please describe how you plan to use Twitter data and/or APIs. The more detailed the response, the easier it is to review and approve."
Here you need to explain why you want to use Twitter API, which is either to allow your users to login to your native app via their account Twitter and/or to display your tweets natively in your app (200 characters minimum).

The specifics
"Please answer each of the following with as much detail and accuracy as possible. Failure to do so could result in delays to your access to Twitter developer platform or rejected applications."
If you plan on setting a Twitter section in your app, explain that your users will be able to reply or retweet your tweets from your native app by opening Twitter properly, but also to follow your account by opening twitter app on the right page from your native app.

Explain also that you want to display your tweets natively in your app for a better User experience.


Review / Terms:
1. Check your basic info and Intended use, then click "Next"
2. Accept the "Developer agreement & policy" , then click "Submit application"
3. Verify your email and confirm your email address to complete your application.

Note: If your Twitter developer account application is not approved, you need to contact the Twitter team.


2

Create your Twitter app

Once your developer account is validated, you can now create your app Twitter.

1. Go to the menu Projects & Apps > Overview , under Standalone Apps click the "+ Create  App" button.

picture

2. Name your app and click "Complete"
3. The API Key (Consumer Key in your back office) and API secret key (Consumer secret in your back office) are displayed
4. Copy and paste them somewhere safe, you'll need them later on, this is very important.

picture

3

Settings of your Twitter Standalone app

App permissions
1. Click Edit next to "App permissions". 
2. Check "read and write" option
3. Click "Save" and confirm.

picture

Authentication settings
1. Click Edit next to "Authentication settings". 
2. Enable 3-legged OAuth 
3. Fill in the Callback URL: http://127.0.0.1
4. Fill in your website URL (don't forget the https:// )
5. Click "Save"

Note: When you fill in the Callback URL,  spaces can be automatically added at the end of the url. This will give you an error “Not a valid callback URL format”. You will need to delete it and proceed with the validation of the app.


6. Set Callback URL for iOS native app (Premium plan only) other plans can skip this step.

- Add another Callback URL in the authentication settings:
It will be under the form:  twitterkit-YOURAPIKEY://
If your API key is for instance ZepC2rfW8hpwpgjgbVLJQTs9B, (the API key you saved previously) the callback URL will look like this : 
twitterkit-ZepC2rfW8hpwpgjgbVLJQTs9B://

- Click "Save" at the bottom of the page

picture

4

Keys and tokens

1. Go to the tab "Key and Tokens
2. Click the button "Generate" next to "Access token & secret"
3. The Access Token and Access Token Secret are displayed, copy and paste them somewhere safe, you'll need them later on.
This is very important.

picture

5

Set a Twitter section in your GoodBarber back office

1. Add a Twitter section

2. Fill in the information about your Twitter account you got in the image above:
Consumer Key & Consumer Secret 
( = API Key and API Secret Key in your Twitter application settings) 
Access Token and Access Token Secret 

-Click "Add".

picture

3. Your Twitter section in GoodBarber is now linked to your Twitter account.