Automate sharing Pocket links to Twitter through Buffer.
I've always been a terrible Twitter user. Despite the fact I often stumble and save content I'd like to share, I always failed to do it. I feel like you got to be always connected and have the reflex of tweeting right away. I've tried many times but without success so I eventually gave up.
I've recently been exposed to a few tips, e.g why it's ok/advised to tweet many times the same content and how Buffer can actually help you being a good Twitter citizen. I couldn't set up a proper workflow with IFTT/Zapier so I thought I'd build it.
You can read the full story here: I am a terrible Twitter user so I built a tool to help me out.
The process is:
- Save items to your Pocket account
- Retrieve them on Poffer
- Write different tweets for the same content
- Review your queue (Poffer orders the tweets to avoid repetition)
- Add them to your Buffer queue
To avoid the need for storage (and thus costs), by default no data is saved anywhere. That's why you need to authorize the application every time and why it can't suggest you to pick an user linked to your Buffer account (instead you need to enter the right Twitter user name).
There's one thing though that can't be done without storage: keeping track of your tweets history. It means that if you share an item once and reload the page, the same Pocket item is going to show up again.
The feature to keep an history of your tweets is implemented but requires a database and thus costs. There are a few ways you can benefit those "power" privileges...
I'd be glad to create you a VIP account on the application deployed at: http://poffer.gabinaureche.com. I'd just kindly ask for your support by doing one or more of the following:
- Share Poffer on Twitter: Tweet
- Share Poffer on Facebook: Share
- Make a donation (anything, even 0.10€): Paypal
- Say hello: hello@gabinaureche.com
I'll need two things to give you super powers:
- An email address to get in touch
- Your Poffer user name, which should be the email you used to sign up
If you decided to add the tag "poffer" to the items you want to share, you can remove this tag from the ones you tweeted so it won't be retrieved anymore.
Poffer is an open source project so you can clone it and run the application locally (or on your server). Have a look at the documentation below to get started.
Poffer is a NodeJS application that uses MongoDB as data base. You'll also need to create a Pocket and Buffer application, which should be pretty straight forward.
git clone git@github.com:Zhouzi/Poffer.git
- Clone this repositorycd Poffer
- Move to the new Poffer directorynpm install
- Install NodeJS dependencies
For obvious security reasons, there's no secret tokens and whatsoever stored in this repository.
During development, you can create a start.sh
script to make it easier to start the application:
#!/usr/bin/env bash
POCKET_CONSUMER_KEY=<pocket_consumer_key> \
POCKET_REDIRECT_URI=<pocket_redirect_uri> \
BUFFER_CLIENT_ID=<buffer_client_id> \
BUFFER_CLIENT_SECRET=<buffer_client_secret> \
BUFFER_REDIRECT_URI=<buffer_redirect_uri> \
npm start
Make sure to replace the placeholder values <...>
by the relevant information.
With that file created, you can then start the application by running bash start.sh
instead of npm start
.
npm start
- Start applicationnpm run build
- Build assets for production environmentnpm run dev
- Build assets and watch for change for development environment
node ./app/scripts/addUser --email [email] --poffer [poffer_username]
- Add a "VIP" user