NO CODE PLUGINS
Twitter V2 Integration

Twitter V2+V1 Post With Media

13min

Twitter has deprecated the ability to post using the V1 API. Twitter's V2 API endpoint does allow for you to post a Tweet. However, the endpoint available only offers the ability to Post, they do not have an endpoint for posting with media.

The team at Pathfix has found a temporary workaround by using a combination of the V1 and V2 endpoint.



How this works?

  • Use the V1 endpoint to prepare the media for upload
  • Use the V2 endpoint to post the Tweet with media

Note: This is a temporary workaround until Twitter releases the ability to prepare and post Tweet with Media



Setup

You will need to configure and add both, Twitter and Twitter V2 integration in your Pathfix account. This means, your users will have to connect to both Twitter V1 and V2 in your app to give them the ability to post with media.



Document image


Setup in Twitter Dev

  • Create your Twitter Developer account here: https://developer.twitter.com/en/portal
  • If you have an existing account with Twitter developer, make sure you only have the total number of approved projects based on your plan



Twitter API known issues

Due to the ongoing migration from V1 to V2, there are a few known configuration/app issues that our team and users have seen, these are:

  • Twitter is deleting/removing access and blocking API requests for entire accounts that have more than the allowed number of apps. Please check your limits in your account and delete any extra apps



Document image

  • Some users are facing issue of Twitter randomly deleting their app everyday. Adding the app once again resolves this. For more information read the forum discussion here



Setup

  • Click on the Keys and Tokens tab
  • Copy the Consume Keys for use with Twitter V1 configuration
  • Copy the OAuth 2.0 Keys for use in Twitter V2 configuration



Document image




Setup in Pathfix

  • Log into Pathfix and add an Application (or select an existing application)
  • Select Twitter from the list of providers
  • Add the Consumer Keys copied over from your Twitter dev portal
  • Save the settings
  • Click on Test Connection and connect an account to test the configuration



Document image




  • Go back to the Application page
  • Select Twitter V2 from the list of providers
  • Add your Twitter V2 OAuth 2.0 ClientID and ClientSecret and hit Save
  • Click on Test Connection and connect an account to test the configuration



Document image




Setup in Bubble

You will need to install 3 plugins for the setup to work:



Install all 3 plugins and add the Public Key and x-partner-key to the Pathfix plugins before proceeding.



  • In the Design page, add the Pathfix Connector element to the page
  • In the setup/properties window, select 'All Providers in my Pathfix account' and add the following list of providers: twitteroauth2,twitter
  • This will show the Twitter V1 and Twitter V2 connect buttons



Document image




  • Add an Input element to capture Text input from your user
  • Add a Picture uploader element to capture images from the user
  • Add a Button element to allow for the post action



Document image




Setting Up The Workflow

This is a 4 step process as Twitter needs certain info and file format, here is the sample setup.



Step 1:

  • Select to include the file size and file type with the call



Document image




Step 2:

  • Select the media ID String and Base 64 encoding



Document image




Step 3:

  • Finalize the media and select the Media ID String



Document image




Step 4:

  • Post the Tweet with media and Message using the Twitter V2 API for Post Media with Tweet



Document image




Your setup is complete.

Go to the Preview of your app, connect your Twitter account to both Twitter V1 and V2, test the post with media functionality.





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