https://github.com/dimdengd/yeahtwitter
Adds Yeah! button to Twitter, essentially a public Like
https://github.com/dimdengd/yeahtwitter
Last synced: about 1 year ago
JSON representation
Adds Yeah! button to Twitter, essentially a public Like
- Host: GitHub
- URL: https://github.com/dimdengd/yeahtwitter
- Owner: dimdenGD
- Created: 2024-06-15T13:53:13.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-23T12:44:08.000Z (over 1 year ago)
- Last Synced: 2025-04-04T12:57:40.356Z (about 1 year ago)
- Language: JavaScript
- Size: 295 KB
- Stars: 228
- Watchers: 3
- Forks: 9
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yeah! for Twitter
Extension that adds a "Yeah!" button to Twitter. Essentially, it's a public Like button. It doesn't send spammy images into replies, instead it saves your Yeahs into a shared database. Everyone can see who Yeahed a tweet, and what tweets person Yeahed.
This extension supports both new Twitter and OldTwitter!

## Installation
Chrome, Edge, Opera, Brave, Vivaldi, etc:

Firefox, Waterfox, LibreWolf, Floorp, etc:

Userscript (Tampermonkey, Greasemonkey, Violentmonkey, etc):
###
Userscript
## Manual Installation
1. Go to [Releases](https://github.com/dimdenGD/YeahTwitter/releases) page.
2. Download `chrome.zip` if you're on Chromium based browsers (Chrome, Edge, Opera, Brave, etc.) or `firefox.zip` if you're on Firefox.
### Chromium
- Unpack file anywhere
- Go to `chrome://extensions`
- Turn on Developer mode
- Press "Load unpacked" and select folder with extension
### Firefox
- Go to `about:debugging#/runtime/this-firefox`
- Press "Load Temporary Add-on" and select zip file you downloaded
- Installing it this way will remove extension after browser restart, see below for permanent installation
### Firefox Developer Edition / Nightly
- Go to `about:config`
- Set `xpinstall.signatures.required` to `false`
- Go to `about:addons`
- Press "Install Add-on From File" and select zip file you downloaded
## API
If you wish to implement Yeah! button in your Twitter mod, you can use this API.
**Base URL:** `https://yeah.dimden.dev`
All requests use POST method.
All requests require Content-Type: `application/json`.
### Request Token - `/api/request_token`
Returns `{ public_token: String, private_token: String }`.
You need to make user tweet `yeah-xxxxxxxx` where `xxxxxxxx` is public token.
### Verify Token - `/api/verify_token`
Requires body: `{ public_token: String, private_token: String, tweet: Tweet }`.
`Tweet` is object of [this format](https://developer.x.com/en/docs/twitter-api/v1/data-dictionary/object-model/tweet). Must also include `user` object inside with `id_str`.
Will reply with `success` if everything went correctly. After that you can save `private_token` somewhere to use in other requests.
### Get Yeah data for tweets - `/api/get`
Requires body: `{ post_ids: String, key: private_token }`.
`post_ids` is string of tweet IDs separated by comma. Max 100 tweets per request.
Will return `[ { post_id: String, count: Number, yeahed: Boolean }, ... ]`.
### Yeah a tweet - `/api/yeah`
Requires body: `{ post_id: String, key: private_token }`.
Will reply with `done` if everything went fine.
### Unyeah a tweet - `/api/unyeah`
Requires body: `{ post_id: String, key: private_token }`.
Will reply with `done` if everything went fine.
### Get users that Yeahed a tweet - `/api/get_users`
Requires body: `{ post_id: String, key: private_token, page: Number }`.
`page` starts with 1.
Will return an array with user ids.
### Get tweets that user Yeahed - `/api/get_yeahs`
Requires body: `{ user_id: String, key: private_token, page: Number }`.
`page` starts with 1.
Will return an array with tweet ids.
### Get how many tweets user Yeahed - `/api/get_user_yeah_count`
Requires body: `{ user_id: String, key: private_token }`.
Will return `{ count: Number }`.