Defining the Twitter App
Twitter Apps and Credentials
This part of the project is very easy. It's all point and click. It's very obvious once you know where to start.
Sign into Twitter, start creating a new application
Start by signing into Twitter.
Then go to the page apps.twitter.com and click on Create New App.
Start an editor session in a terminal window, you will need to copy and paste a few cryptic strings into there. They're needed for later programming steps.
Name and description
Specify a name and a description for the application. This is intended to make it easier for you keep track of things once you have created dozens or hundreds or even thousands of applications.
"My Tweet scheduler" would be fine for both fields here.
Website and Callback URLs
Since we aren't really creating an application for users, the website URL doesn't really matter. Neither does the callback URL list, which I will leave blank.
Click the box to agree to the Twitter Developer Agreement.
Then click the button to create the application.
Application Details
Congratulations, you have created a Twitter application!
Notice that this page has four tabs, Details, Settings, Keys and Access Tokens, and Permissions. We clicked on the button to create the app on the previous screen, that took us to the Details tab.
Click the Settings tab.
Application Settings
Copy and paste the Consumer Key, also called the API Key, into a text file. It's a 25-character mixed-case alphanumeric string. Also paste the name, "API KEY", into place. There are a few of these cryptic strings, you have to keep track of which one is which.
Then scroll back up and click the Permissions tab.
Application Permissions
We want to upload image files and post text status updates. Make sure that access is set to Read and Write.
Then click on the Keys and Access Tokens tab.
Consumer Key and API Secret
The Consumer Key or API Key appears again on this screen.
Copy and paste the Consumer Secret, also called the API Secret, into a text file along with the Owner ID.
Then scroll further down that page.
Creating the Access Token
Click the button Create my access token.
Access Token and Access Token Secret
Copy and paste the Access Token and the Access Token Secret into that same small text file.
Checklist
You have defined an app within Twitter, and you should have a record of:
- Owner name (Twitter identity)
- Owner ID
- API Key
- API Secret
- Access Token
- Access Token Secret
Creating the Python Program
Now you're ready to
copy and modify my Python program,
test it, and deploy it with cron.