How to integrate X

Create a Twitter Developer Account: Sign up for a Twitter Developer account if you haven't already done so at https://developer.twitter.com.

  1. Create or Access Your App: By default, each developer account should have an app created. If not, create a new app.

  2. Update User Authentication Settings: Navigate to your app's settings and update the User Authentication settings. First, Change the App type to "Web App". Then, add the following Callback URIs: https://api.ultrade.org/social/twitter/callback and https://api.ultrade.org/social/wl/twitter/callback You must add BOTH of the above. then set the Website URL to your ACTUAL WEBSITE (for example https://myProject.com)

  3. Generate Credentials: After saving the authentication settings, you'll be provided with a Client ID and Client Secret. If not, you can regenerate them on the "Keys and Tokens" page. Additionally, generate a Bearer Token from the same page.

  4. Pass Credentials to Ultrade Partner admin App: Provide the Client ID, Client Secret, and Bearer Token to the Ultrade partner admin App by cling on the 'Point system' section in the left navigation, then clicking the configure X button in the social accounts overview. Then entering the Client ID, Client Secret, and Bearer Token. When you click save, our system will then check your credentials. If there are any errors, please double check if you've entered the details correctly.

Setting Up X Webhooks with IFTTT

  1. Configure IFTTT Account: Create an account on https://ifttt.com and purchase a Pro plan subscription to enable setting up X events.

  2. Create a New X Post Event:

    • On iftt.com click the "Create" button on top right of screen

    • Then select the "If This" option.

    • Choose the Twitter service

    • Then select the trigger "New tweet by you".

    • Select the twitter account from which IFTTT will trigger new Post event.

    • Select the checkboxes for “retweets” and “@replies” if needed. Then click the create trigger button.

    • Proceed to configure the service by clicking the “Add” button on the “Then That” bar.

    • Type "webhook" into the search bar and select it from the available services.

    • Choose the action “Make a web request”.

    • Now, please enter the Ultrade webhook URL: https://api.ultrade.org/social/wl/twitter/webhooks

    • Set the method to POST and the Content Type to application/json.

    • Each webhook trigger should have specific headers to work. To set these headers, in the additional header field, please set a custom request header using your partner ID and IFTTT token from the admin panel that can be found here. Repeat the process for each webhook trigger. To find you partner ID please click on you project name in the admin header, your ID is displayed there at top of the list.

    • The company ID header should be in this format: companyid: [partners id here] for example. [Update IFTTT headers configuration picture according to the new changes]

    • Then Paste the following code in the Body section:

      jsonCopy code{
        "type": "newTweet",
        "text": "<<< {{Text}}>>>",
        "userName": "<<< {{UserName}}>>>", 
        "tweetLink": "<<< {{LinkToTweet}}>>>",
        "time": "<<< {{CreatedAt}}>>>"
      }
    • Review and finish the process.

  3. Create a New X Mention Event:

    • Repeat the process above but choose the "New mention of you" trigger instead of "New tweet by you".

    • Set your partnerId and IFTTT token in additional headers section.

      In the webhook Body, use the following code:

      jsonCopy code{
        "type": "newMention",
        "tweetLink": "<<<{{LinkToTweet}}>>>",
        "userName": "<<< {{UserName}}>>>",
        "text": "<<< {{Text}}>>>"
      }
  4. Create a New X Follower Event:

    • Repeat the process but choose the "New follower" trigger.

    • Set your partnerId and IFTTT token in additional headers section.

      In the webhook Body, use the following code:

      jsonCopy code{
        "type": "newFollower",
        "userName": "<<< {{FullName}}>>>",
        "profileLink": "<<< {{LinkToProfile}}>>>"
      }

Optional Settings

Add hashtags: Now that you've enter your x credentials, you can add any hastags. By adding hashtags, you set up a filter that makes the point system collect user engagement only from posts containing at least one of the specified hashtags.

Set Expiration settings: The Expiration settings panel allows you to set expiration for your x posts. This related to how long we track user engagement on a post. By default it is set to 2 days but you change this from halfday to upto 5 days in the drop down.

Post Manager: The Post manager panel, gives you an overview of all the x posts, giving you the ability to Delete, Expire now, or Extend you X posts by clicking on the actions link to any post. It also gives you the ability to enable or disable collecting user Comments and likes from your X posts via the switch at the top of the panel...

Last updated