-
Notifications
You must be signed in to change notification settings - Fork 135
Client Twitter
The curent Twitter client uses a polling mechanism as provided by the Python package tweepy, it is envisaged in the future that this will have streaming added to it. This is in the backlog and is likely to make it into a 1.x release
The client is derived from the following Python class
programy.clients.twitter.TwitterBotClient
To run the Facebook client, you can use the shell script in Y-Bot scripts folder
./y-bot-twitter.sh
Or you can use the command line
python3 -m programy.clients.polling.twitter.client --config <PATH TO CONFIG> --cformat yaml --logging <PATH TO LOGGING>
The configuration settings can be found in the wiki page Twitter Configuration.
In addition to configuration settings, there are a number of Twitter-specific license keys. These are stored in license.keys in the /config file. However, for security reasons, this file is excluded from Github and you'll need to create your own with the following settings
TWITTER_USERNAME = programybot
TWITTER_CONSUMER_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWITTER_CONSUMER_SECRET = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWITTER_ACCESS_TOKEN = xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWITTER_ACCESS_TOKEN_SECRET = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
These keys and secrets come from registering as a developer on Twitter, creating an app and then following the instructions to create Consumer And Access tokens and secrets. Please note that a Bot needs specific permissions, so please make sure that you set the access to 'Read, Write and Access direct messages'
What type of access does your application need?
Read only
Read and Write << default
Read, Write and Access direct messages << needed!
Email: [email protected] | Twitter: @keiffster | Facebook: keith.sterling | LinkedIn: keithsterling | My Blog
- Home
- Background
- Guiding Principles
- Reporting an Issue
- Installation
- You And Your Bot
- Bots
- Clients
- Configuration
- AIML
- Sentence Splitting
- Natural Langauge Processing
- Normalization
- Spelling
- Sentiment Analysis
- Translation
- Security
- Hot Reload
- Logging
- Out of Band
- Multi Language
- RDF Support
- Rich Media
- Asynchronous Events
- Triggers
- External Services
- Dynamic Sets, Maps & Vars
- Extensions
- Pre & Post Processors
- Custom Nodes
- The Brain Tree
- Utilities
- Building It Yourself
- Creating Your Own Bot
- Contributing
- Performance Testing
- FAQ
- History
- Website