this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Documentation for auth and followers commands

authored by

Simon Willison and committed by
GitHub
1f1310a2 fd1a989e

+43
+43
README.md
··· 9 9 ## How to install 10 10 11 11 $ pip install twitter-to-sqlite 12 + 13 + ## Authentication 14 + 15 + First, you will need to create a Twitter application at https://developer.twitter.com/en/apps 16 + 17 + Once you have created your application, navigate to the "Keys and tokens" page and make note of the following: 18 + 19 + * Your API key 20 + * Your API secret key 21 + * Your access token 22 + * Your access token secret 23 + 24 + You will need to save all four of these values to a JSON file in order to use this tool. 25 + 26 + You can create that tool by running the following command and pasting in the values at the prompts: 27 + 28 + $ twitter-to-sqlite auth 29 + Create an app here: https://developer.twitter.com/en/apps 30 + Then navigate to 'Keys and tokens' and paste in the following: 31 + 32 + API key: xxx 33 + API secret key: xxx 34 + Access token: xxx 35 + Access token secret: xxx 36 + 37 + This will create a file called `auth.json` in your current directory containing the required values. 38 + 39 + ## Retrieving your Twitter followers 40 + 41 + The `twitter-to-sqlite followers` command retrieves details of every follower of the specified account. You can use it to retrieve your own followers, or you can pass a screen_name to pull the followers for another account. 42 + 43 + The following command pulls your followers and saves them in a SQLite database file called `twitter.db`: 44 + 45 + $ twitter-to-sqlite followers twitter.db auth.json 46 + 47 + The `auth.json` path argument is optional - if you omit it the script will look for `auth.json` in your current directory. 48 + 49 + To retrieve followers for another account, use: 50 + 51 + $ twitter-to-sqlite followers twitter.db --screen_name=cleopaws 52 + 53 + See [Analyzing my Twitter followers with Datasette](https://simonwillison.net/2018/Jan/28/analyzing-my-twitter-followers/) for the original inspiration for this command. 54 +