Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcartmell/mastodon-twitter-crosspost
A lightweight program to crosspost from Mastodon to Twitter, suitable for self-hosting.
https://github.com/mcartmell/mastodon-twitter-crosspost
cross-posting mastodon self-hosted twitter
Last synced: about 2 months ago
JSON representation
A lightweight program to crosspost from Mastodon to Twitter, suitable for self-hosting.
- Host: GitHub
- URL: https://github.com/mcartmell/mastodon-twitter-crosspost
- Owner: mcartmell
- License: mit
- Created: 2022-06-11T11:43:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-20T09:00:23.000Z (about 2 years ago)
- Last Synced: 2024-04-13T20:58:11.245Z (8 months ago)
- Topics: cross-posting, mastodon, self-hosted, twitter
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mastodon-Twitter-Crosspost
A lightweight program to crosspost from Mastodon to Twitter, suitable for self-hosting. It will poll the Mastodon instance every minute for new posts and post them to Twitter.
*WARNING* This is a work in progress with only basic functionality for cross-posting tweets and your own replies.
## Getting Started
### Prerequisites
- A [Mastodon](https://mastodon.social/) account
- A [Twitter](https://twitter.com/) account
- A [Twitter developer account](https://developer.twitter.com/) with OAuth 1.0 and 2.0 credentialsTwitter API v1.1 is required for posting media, and v2.0 is required for posting tweets.
### Installing
```
go install github.com/mcartmell/mastodon-twitter-crosspost@latest
```Create a `.env` file with your credentials, for example:
```
MASTODON_URL=https://mastodon.example.com
MASTODON_ACCOUNT_ID=123456789
TWITTER_OAUTH2_REDIRECT_URI=http://localhost:8888
TWITTER_OAUTH2_CLIENT_ID=123456789
TWITTER_OAUTH2_CLIENT_SECRET=123456789
TWITTER_CONSUMER_KEY="123456789"
TWITTER_CONSUMER_SECRET="123456789"
TWITTER_ACCESS_TOKEN="123456789"
TWITTER_ACCESS_TOKEN_SECRET="123456789"
LISTEN_PORT=8888
```Run the program:
mastodon-twitter-crosspost
The program will output a link to authorize API access to your Twitter account. Follow the instructions to complete the authorization.
## Features
- Crossposts from Mastodon to Twitter
- Supports crossposting own threads
- Supports images## TODO
This is a work in progress with many missing features:
- Support for videos
- Support for content warnings## Deployment
There is a [Dockerfile](Dockerfile) included for deployment, intended for self-hosting with minimal memory usage.
## License
This project is licensed under the [MIT license](LICENSE), see the [LICENSE](LICENSE) file for details.