Download PDF
Steps Create Twitter Account Apply for a Twitter Developer Account Create Twitter App Create an Access Token Integrate the Twitter App with Ameyo Settings of Twitter Media Profile Delete Twitter Media Profile Ticket Resolver

Twitter Media Profile

You can create Twitter Media Profile using your Twitter Handle and interact with your clients on Twitter from here. It is requried to perform the following steps sequentially for creating a Facebook Messenger Media Profile.

  1. Create Twitter Account
  2. Apply for a Twitter Developer Account
  3. Create Twitter App
  4. Integrate the Twitter App with Ameyo
  5. Submit Your App to Twitter for Review
Create Twitter Account

If you do not have a Twitter Account already, perform the following steps to createa a Twitter Account.

  1. Visit Twitter.com and click "Sign Up" button. It takes you to "Sign Up" page.
  2. Follow the onscreen instructions to create your Twitter Account.

    Please refer to "Signing up with Twitter" page for more information.

  3. Make sure to verify your email address and phone number while
Apply for Twitter Developer Account

Perform the following steps to create a Twitter Developer Account. After creation, you have to submit it for approval. Once approved, you can go ahead to create a Twitter App and integrate it in your Ameyo Server.

  1. Visit "Twitter Developer Portal" page and click "Sign In" button on the top right corner. It takes you to "Login" page.
  2. Login with your credentials. It takes you back to the Twitter Developer Portal.
  3. Click "Apply" on the top right corner to apply for a Twitter Developer Account. It takes you to the following page.

    Start Apply for a Developer Account

    Figure: Twitter Developer Portal

  4. Click "Apply for a Developer Account" button. It shows the following page.

    Use Your Profile as Developer Account

    Figure: Use Your Profile as Developer Account

  5. Click "Continue" to use this account as a Developer Account. It shows the following page, which asks for the details to create a Developer Account.

    Developer Account Details

    Figure: Asking for Account Details

  6. Here, you have to provide the following details.
    1. Who are you requesting access for?: Select "I am requesting access for my organization". The other fields will be displayed.
    2. Organization Name: Provide the name of your oganization.
    3. Legal Entity Name: Provide the Legal Entity Name of your organization.
    4. Organization Website URL: Provide the Website URL of your organization.
    5. Organization Primary Country of Operation: Select the name of country from where your orgnaization operates.
    6. Where are your customers located?: Select the areas where your customers are located.
    7. How do you categorize your organization?: Select the category applicable for your organization.
    8. What industries do you/will you serve?: Select the industries which you serve.
  7. After providing the details, click "Continue". It shows the next page.

    Use Case Details

    Figure: Asking for Use Case Details

  8. Here, you have to provide the following details.
    1. What use case(s) you are interested in?: Select the required use cases of your application. For Ameyo, it can be the following options.
      • Chatbots and Automation
      • Consumer / End User Experience
      • Engagement and Customer Service
      You can more options, as per requirement.
    2. Describe in your own words what you are building: As per it's description says, you have to explain the following items.
      • Purpose of your product or service
      • What will be delivered to your customers?
      • How do you analyze Tweets, Twitter users, or their content?
      • How will you display the Twitter data to users of your end product or service?
    3. Will your product, service, or analysis make Twitter content or derived information available to a government entity?: Click "No" if you are not a Government entity.
  9. Click "Continue" to proceed further. The next page shows the Twitter's Terms of Service.

    Terms and Conditions

    Figure: Terms and Conditions

  10. Read the Terms and Conditions carefully as it will be an Agreement between Twitter and your Organization.
  11. Click "Submit Applciation" button. It takes you the next page.
  12. Verify your Email Address on this page.

Now, you have to wait for the approval for your Developer Account. After approval, you can proceed to create a Twitter App.

Create Twitter App

Perform the following steps to create a Twitter App.

You can create a Twitter App only when you have an approved Twitter Developer Account.

  1. Visit "Twitter Apps Portal" page and click "Sign In" button on the top right corner. It takes you to "Login" page.
  2. Login with your credentials. It shows the following page.

    Twitter Apps

    Figure: Twitter App Management

  3. Click "Create New App" button. It shows the following page.

    App Creation

    Figure: Create Twitter App

  4. Provide the following details here.
    1. Name of your App
    2. Description
    3. Website URL
    4. Callback URL
  5. Click "Yes" to agree with the terms and conditions.
  6. Click "Create your Twitter Application."

Now, your Twitter App will be submitted for approval. After approval, it will be registered with Twitter.

Create an Access Token

Perform the following steps to create an access token for your Twitter App.

  1. Visit "Twitter Apps Portal" page and click "Sign In" button on the top right corner. It takes you to "Login" page.
  2. Login with your credentials. It shows all of your Twitter App.
  3. Select your Twitter App to open its page.

    App Page

    Figure: Twitter App Page

  4. Switch to "Key and Access Tokens" Page.

    Keys and Token Page

    Figure: Keys and Token Page

  5. Click "Create my access token" to generate the access token.

    Generated the Token

    Figure: Access Token

  6. Note down the following items.
    • Twitter Username
    • Consumer Key
    • Consumer Secret
    • Access Token
    • Access Token Secret
Integrate the Twitter App with Ameyo

Perform the following steps to integrate the Twitter App in Ameyo through backend.

  1. Access the Operating System through Putty and execute the following commands to enter the PostgreSQL system.

    psql -U postgres

  2. In the PostgreSQL console, execute the following command to enter your database.

    \c <DB_Name>

    Replace <DB_Name> with the name of database that has been integrated with your Ameyo App.
  3. Execute the following command to enter Media Profile ID, Screen Name, Access Token, Access Token Secret, Consumer Key, and Consumer Secret in "twitter_profile" table.

    INSERT INTO twitter_profile (<media_profile_id>, <screen_name>, <accesstoken>, <access_token_secret>, <consumer_key>, <consumer_secret>, should_fetch_messages) VALUES ('mediaProfilehereid', 'screenName', 'accessToken', 'accessTokenSecret', 'consumerKey', 'consumerSecret', 'true');

    Replace the following fields.

    Samle Attribute

    Required Value

    <media_profile_id>

    Provide a unique ID for your media profile.

    <screen_name>

    Twitter Handle

    <accesstoken>

    Access Token

    <access_token_secret>

    Access Token

    <consumer_key>

    Consumer Key

    <consumer_key>

    Consumer Secret

  4. Execute the following command to enter the Media Profile details in "media_profile" table.

    INSERT INTO media_profile(contact_center_id, media_profile_id, media_entity_name, media_profile_type, fetch_timer_interval, is_incoming_allowed, is_outgoing_allowed) VALUES ('<contact_center_id>', '<media_profile_id>', '<media_entity_name>', '<media_profile_type>', '60', true, true);

    Replace the following values.

    Samle Attribute

    Required Value

    <contact_center_id>

    Provide the ID of the Contact Center where you want to create this Twitter Media Profile.

    <media_profile_id>

    Provide the same Media Profile ID that you have entered in "twitter_profile" table.

    <media_entity_name>

    Provide a unique name for your Media Profile. If you are creating multiple media profiles, make sure that all have unique names.

    <media_profile_type>

    Type TWITTER.

  5. Execute the following command to make an entry in "interaction_resolver_configuration".

    INSERT INTO interaction_resolver_configuration (media_profile_id, resolver) VALUES ('<media_profile_id>', '["socialmediainteractionresolvervalue"]');

    Replace <media_profie_id> with the ID of your Media Profile that you have provided in "twitter_profile" table.

  6. Now, execute the following command to exit from database console.

    \q

  7. Execute the following command to restart the appserver service.

    ameyoctl service appserver restart

Twitter Media Profile has been created now. You can now use this media profile in the campaign.

View and Modify Settings of Twitter Media Profile

Select a Twitter media profile in the list to view its settings on the right side under "Settings" tab.

Settings of Twitter Media Profile

Figure: Settings of Twitter Media Profile

You can modify the settings here and click "Apply" to apply the same. Rather, you can click "Refresh" to discard the changes.

Delete Twitter Media Profile

The deleted Twitter Media Profile cannot be retrieved back. The campaigns, queues, and users using this Media Profile will be disabled to use the Twitter to interact with your clients.
Also, it is associated with your Twitter App. If you delete it now and again try to create a new Twitter Profile, you have to go through the Command Line Interface to execute the commands. Also, you may have to re-submit the App again to Twitter for review.

Perform the following steps to delete a Twitter media profile.

  1. Select a Twitter media profile.
  2. Click "Delete" to delete it. It shows the following warning message.

    Twitter Profile Deletion Warning

    Figure: Asking to delete the Twitter Media Profile

  3. Click "Yes" to delete the Twitter media profile. Rather, you can click "No" to not delete it.
Ticket Resolver for Twitter Profile

This tab lets you manage how the tickets in a campaign (where the selected media profile is added) will be handled. Following is a screenshot of Ticket Resolver Tab of Twitter Media Profile.

Ticket Resolver of Twitter Profile

Figure: Ticket Resolver of Twitter Media Profile