Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xdevplatform/tweet-annotations
App to demo various features and functionality powered by Tweet Annotations and the Twitter API v2
https://github.com/xdevplatform/tweet-annotations
flask flask-application python tweet-annotations twitter-api-v2 web-app web-application
Last synced: 1 day ago
JSON representation
App to demo various features and functionality powered by Tweet Annotations and the Twitter API v2
- Host: GitHub
- URL: https://github.com/xdevplatform/tweet-annotations
- Owner: xdevplatform
- License: apache-2.0
- Created: 2021-03-02T16:18:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:58:12.000Z (almost 2 years ago)
- Last Synced: 2024-04-22T01:00:33.599Z (7 months ago)
- Topics: flask, flask-application, python, tweet-annotations, twitter-api-v2, web-app, web-application
- Language: Python
- Homepage:
- Size: 152 KB
- Stars: 6
- Watchers: 13
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Tweet Annotations
This sample code shows you how you might build a demo web app with Python and [Flask](https://flask.palletsprojects.com/en/1.1.x/) and exemplifies some of the features and functionality available with the [Twitter API v2](https://developer.twitter.com/en/docs/twitter-api/early-access) and [Tweet Annotations](https://developer.twitter.com/en/docs/twitter-api/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](https://developer.twitter.com/en/docs/apps/overview) 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://127.0.0.1:5000/`).
* Further information on configuring your Flask app can be found [here](https://flask.palletsprojects.com/en/1.1.x/config/).## 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).