Skip to content

App to demo various features and functionality powered by Tweet Annotations and the Twitter API v2

License

Notifications You must be signed in to change notification settings

xdevplatform/Tweet-Annotations

Repository files navigation

Tweet Annotations

This sample code shows you how you might build a demo web app with Python and Flask and exemplifies some of the features and functionality available with the Twitter API v2 and Tweet Annotations.

Set up

  • In the root directory, rename credentials.yaml.template to credentials.yaml and insert your Twitter App credentials. Note that you must use the credentials belonging to a Twitter Developer App with access to the Twitter API v2.

  • Don't forget to add credentials.yaml to your .gitignore file to avoid compromising your App credentials.

Running the web app locally

Follow these steps to run the web app on your local machine:

  • From the root directory in the command line type: export FLASK_ENV=development. (On Windows, use set instead of export.)
  • Then type flask run.
  • The web app is now running on your local host (usually something like http:https://127.0.0.1:5000/).
  • Further information on configuring your Flask app can be found here.

Functionality

This web app illustrates the following functionality:

  1. Get topics of interest for a profile (including top Tweet Annotations associated with a profile's Tweets and top most used emojis by this profile).
  2. Get topics of interest for a profile's followers. Same functionality as above, but for a user profile's follower base.
  3. For a given topic, get a list of users who recently Tweeted about this topic.
  4. For a given topic, get resonance metrics (including number of Tweets sent within the past 7 days, and aggregate engagement metrics, such as retweets, quote Tweets, likes, and replies).

About

App to demo various features and functionality powered by Tweet Annotations and the Twitter API v2

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages