Skip to content

Conversation

harrislapiroff
Copy link
Contributor

@harrislapiroff harrislapiroff commented Jul 6, 2023

This PR should get all trackthenews-based bots working again with no changes to their configuration. We update tweet creation to use the now-required v2 API by switching from Twython to Tweepy.

I also included a few dependency upgrades I needed to get the package working on python 3.9

This is useful for supporting local testing where a dev installs
it as a local package and a egg-info directory is auto-generated
Twython only supports the Twitter v1 APIs which have (mostly) been
removed. Tweepy allows us to use the v2 APIs.
@harrislapiroff harrislapiroff marked this pull request as ready for review July 6, 2023 21:34
@harrislapiroff harrislapiroff requested a review from eloquence July 6, 2023 21:34
@harrislapiroff
Copy link
Contributor Author

@eloquence would you like to review this? You should be able to test it with whatever setup you're using to test your own PR :)

Copy link
Member

@eloquence eloquence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected and changes make sense (inasmuch anyone can make sense of Twitter's chaotic API situation). I was able to successfully post FOIAFeed-style tweets using a throwaway account with these changes.

I also got tripped up by the process for granting read/write permission at first, that's a step we may want to document a bit more clearly, but we can do that separately.

@eloquence eloquence merged commit 384972f into main Jul 7, 2023
@eloquence eloquence deleted the twitter-api-v2 branch July 7, 2023 00:07
@eloquence eloquence mentioned this pull request Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants