-
Notifications
You must be signed in to change notification settings - Fork 23
[App] Twitter
HouzuoGuo edited this page Oct 9, 2022
·
3 revisions
Post Tweets and read tweets from home time-line.
Create your very own Twitter application:
- Visit Twitter Developers.
- Navigate to My apps.
- Proceed to create a new application, fill in the name, description, and website. Leave callback URL empty.
And then, obtain an API access token:
- Visit your newly created app, navigate to "Key and Access Tokens" tab.
- Note down your "Consumer Key (API Key)" and "Consumer Secret (API Secret)".
- Click "Create my access token".
- Note down your "Access Token" and "Access Token Secret".
The keys and secrets do not expire. They will be used in laitos configuration.
Under JSON object Features
, construct a JSON object called Twitter
that has the following mandatory properties:
Property | Type | Meaning |
---|---|---|
AccessToken | string | API access token. |
AccessTokenSecret | string | API access token secret. |
ConsumerKey | string | Consumer (application) API key. |
ConsumerSecret | string | Consumer (application) API secret. |
Here is an example:
{ ... "Features": { ... "Twitter": { "AccessToken": "12345678-erngbfuninxkjnxvvvvveruihuiuiersuiiidf", "AccessTokenSecret": "iowa4jiojiobniofgnncvbmknbnyrtubyt", "ConsumerKey": "fxoieprkpokpowwwwmcgbmkk", "ConsumerSecret": "xvm,mbrypziweijzwemimfdrtgjkbmfgmkkm" }, ... }, ... }
Use any capable laitos daemon to invoke the app:
- Post a tweet:
.tp tweet content
, a short moment later the command response will say a number that is length of tweet. - Read latest tweets from home time-line:
.tg skip count
, whereskip
is the number of latest tweets to discard, andcount
is the number of tweets to read after discarding.
Be aware: Twitter will only allow retrieving up to 200 latest tweets, that means skip + count
may not exceed 200.
Table of Contents
- Home
- Get started
- Component list
- Tips for running on public cloud
- Tips for using apps over satellite
- laitos terminal
Daemon Components
- DNS server
- Mail server
- Web server
- Web proxy server
- Telnet server
- Telegram chat-bot
- Simple IP services server
- SNMP server
- System maintenance
- Phone home telemetry
Web Service Components
- Twilio telephone/SMS hook
- Microsoft chat bot hook
- The Things Network LORA tracker integration
- Recurring commands
- App command form
- Simple app command execution API
- GitLab browser
- Temporary file storage
- Simple web proxy
- Desktop on a page (virtual machine)
- Read telemetry records
- Program health report
- System process explorer
- Prometheus metrics exporter
- HTTP request inspector
- HTTP request logger
Apps