Skip to content

Conversation

nahuelhds
Copy link
Contributor

@nahuelhds nahuelhds commented Apr 26, 2020

You can now execute diffinengine with --add flag to receive the Twitter auth URL and use it for getting the tokens for the account you wanna add to the config yaml.

Usage example

$ diffengine --add

Log in to https://twitter.com as the user you want to tweet as and hit enter.
Visit https://api.twitter.com/oauth/authorize?oauth_token=QKGAqgAAAAABDsonAAABcbfQfFw in your browser and hit enter.
What is your PIN: 1234567

These are your access token and secret.
DO NOT SHARE THEM WITH ANYONE!

access_token
xxxxxxxxxxx-yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

access_token_secret
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

This way you can copy&paste the token in your own config.yaml file

@edsu
Copy link
Member

edsu commented Apr 26, 2020

Awesome! I kind of like the subcommand style (from git) so diffengine add instead of diffengine --add but I think this works for now, and it can easily be updated later if we need to.

@edsu edsu merged commit 80a4b80 into DocNow:master Apr 26, 2020
@nahuelhds
Copy link
Contributor Author

I agree with your observation, Ed. Go with it!

@nahuelhds nahuelhds deleted the feature/cli-command-for-twitter-auth branch April 26, 2020 20:00
@nahuelhds
Copy link
Contributor Author

PS: I've fixed the "Y/n" option to actually get the default value as a "Y" when the user just hits Enter when the config is built for the first time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants