2015-06-13 19:46:44 +02:00
|
|
|
node-red-node-twitter
|
|
|
|
=====================
|
|
|
|
|
|
|
|
<a href="http://nodered.org" target="_new">Node-RED</a> nodes to talk to Twitter.
|
|
|
|
|
|
|
|
The Twitter API will **NOT** deliver 100% of all tweets. This does **NOT** give access to the Twitter Firehose.
|
|
|
|
|
2015-06-16 18:41:32 +02:00
|
|
|
Tweets of who you follow will include their retweets and favourites.
|
2015-06-13 19:46:44 +02:00
|
|
|
|
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
Run the following command in your Node-RED user directory - typically `~/.node-red`
|
2015-06-13 19:46:44 +02:00
|
|
|
|
|
|
|
npm install node-red-node-twitter
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
Provides two nodes - one to receive messages, and one to send.
|
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
### Input
|
2015-06-13 19:46:44 +02:00
|
|
|
|
|
|
|
Twitter input node. Can be used to search either:
|
|
|
|
|
|
|
|
- the public or a user's stream for tweets containing the configured search term
|
|
|
|
- all tweets by specific users
|
|
|
|
- direct messages received by the authenticated user
|
|
|
|
|
|
|
|
Use **space** for *and*, and **comma** , for *or* when searching for multiple terms.
|
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
Sets the `msg.topic` to *tweets/* and then appends the senders screen name.
|
2015-06-13 19:46:44 +02:00
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
Sets `msg.location` to the tweeters location if known.
|
2015-06-13 19:46:44 +02:00
|
|
|
|
2016-11-12 12:43:25 +01:00
|
|
|
When returning events it sets the `msg.payload` to the twitter event, a full list is documented by
|
|
|
|
<a href="https://dev.twitter.com/streaming/overview/messages-types#Events_event" target="_new">Twitter</a>.
|
|
|
|
|
|
|
|
Sets `msg.tweet` to the full tweet object as documented by <a href="https://dev.twitter.com/overview/api/tweets" target="_new">Twitter</a>.
|
|
|
|
|
|
|
|
**Note**: This node is not connected to the FireHose, so will not return 100% of all tweets to a busy @id or #hashtag.
|
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
Sets `msg.tweet` to the full tweet object as documented by <a href="https://dev.twitter.com/overview/api/tweets">Twitter</a>.
|
2015-06-13 19:46:44 +02:00
|
|
|
|
2016-11-12 12:43:25 +01:00
|
|
|
**Note**: when set to a specific user's tweets, or your direct messages, the node is subject to
|
2015-06-13 19:46:44 +02:00
|
|
|
Twitter's API rate limiting. If you deploy the flows multiple times within a 15 minute window, you may
|
|
|
|
exceed the limit and will see errors from the node. These errors will clear when the current 15 minute window
|
|
|
|
passes.
|
|
|
|
|
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
### Output
|
2015-06-13 19:46:44 +02:00
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
Tweets the `msg.payload`.
|
2015-06-13 19:46:44 +02:00
|
|
|
|
|
|
|
To send a Direct Message (DM) - use a payload like.
|
|
|
|
|
|
|
|
D {username} {message}
|
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
If `msg.media` exists and is a Buffer object, this node will treat it as an image and attach it to the tweet.
|
2015-09-04 10:20:37 +02:00
|
|
|
|
2016-03-02 14:18:24 +01:00
|
|
|
If `msg.params` exists and is an object of name:value pairs, this node will treat it as parameters for the update request.
|