NO CODE PLUGINS

Twitter V2 Integration

12min

The Pathfix Twitter V2 Connector plugin enables integration from your Bubble app to your user's Twitter using the V2 version of Twitters API. The plugin will render the Connect button (UI) and calls the relevant Twitter V2 API for the Action/Data calls mentioned below.

This documentation will show setup guide and a few sample setups.



Setup

The plugin is available in the Bubble Plugin store. Before proceeding, make sure your Twitter Developer app has access to the Twitter V2 API with OAuth 2 access.



Setup in Pathfix

  • Log into Pathfix and add an Application (or select an existing application)
  • Select TwitterV2 from the list of providers (the plugin will work with Twitter V2 only))
  • Add your Twitter V2 ClientID and ClientSecret and hit Save



Document image




  • Navigate to the Keys section
  • Copy your Pathfix Public Key and x-private key for use in your Bubble plugins



Setup in Bubble

Important: You need to install the Pathfix OAuth Connector first before installing this plugin and add your Pathfix Public Key

  • Log in to your Bubble app and click on Add Plugin
  • Pick the Twitter V2 API (OAuth) plugin by Pathfix Inc. and install it (click here to access the plugin)
  • Under x-partner-key (shared headers), add your Pathfix x-partner-key from the Keys section of your Pathfix account



Document image




  • On your Design page, Add the Pathfix Connector element and select 'All Providers configured in my Pathfix Account'
  • Optional: If you have multiple providers configured in your Pathfix app and only want to show the Twitter V2 button, add the provider name under 'List of providers'



Document image




  • Go to Preview to check the Connect UI Button for the Twitter V2 integration



Once installed, there are no additional configurations required to get the Plugin to work. You can setup your workflow in Bubble and start using the actions.



You can add Dropdown, text etc elements to pull in Twitter V2 API data for your users using the plugin and setup Workflows to Twitter actions.



Actions and Data Calls

The plugin calls a few APIs of Twitter V2 API and offers them as Actions or Data Calls in your Bubble app once installed. These are:



Document image


Note: Each consumed action is counted as 1 API call in Pathfix



Post Tweet (Text Only)

Twitter V2 allows you to post Tweets to your users connected account. To set this up, here's what you need to do:

  • Add an Input element to capture the Tweet
  • Add a Button element to Post
  • Create a Workflow on the button and set the following workflow:



Document image






Get Users Tweet

You can use the Twitter V2 API to get the connected users Tweets. Here is what the setup would look like:

  • Add a Repeating group on your Design page
  • Add Text element in the Repeating group
  • In the Data Source, choose to get data from an external API and search for 'Twitter V2 - User - Tweets' API
  • Fill in the required inputs as per the image below
  • Please note: The user_id is your Current User's unique id and the User Id is Twitter User Id that you can get by making the Me call (shown below)



Document image




  • Select the Text element within the Repeating group
  • Select the dynamic input as shown in the following image:



Document image




Get Users Follower Data

You can use the Twitter V2 API to get the connected users Tweets. The setup for this is similar to the previous sample. Here is what the setup would look like:

  • Add a Repeating group on your Design page
  • Add Text element in the Repeating group
  • In the Data Source, choose to get data from an external API and search for 'Twitter V2 - User - Followers' API
  • Fill in the required inputs as per the image below
  • Please note: The user_id is your Current User's unique id and the User Id is Twitter User Id that you can get by making the Me call (shown below)



Document image




  • Select the Text element within the Repeating group
  • Select the dynamic input as shown in the image below
  • You can choose to show any of the data below followers data



Document image








Need help? Reach out to us at [email protected]