Send Direct Messages to a specified user from the authenticating user.
Requires a JSON POST body and Content-Type
header to be set to application/json
.
Note
|
When a message is received from a user you may send up to 5 messages in response within a 24 hour window. Each message received resets the 24 hour window and the 5 allotted messages. Sending a 6th message within a 24 hour window or sending a message outside of a 24 hour window will count towards rate-limiting. This behavior only applies when using the POST direct_messages/events/new endpoint. |
SpEL expressions are used to compute the request parameters from the input message.
Tip
|
Use single quotes (' ) to wrap the literal values of the SpEL expression properties.
For example to set a fixed message text use text='Fixed Text' .
For fixed target userId use userId='666' .
|
java -jar twitter-message-sink.jar
--twitter.message.update.userId=headers['user']
--twitter.message.update.text=payload.concat(\" with suffix \")
--twitter.connection.consumerKey= ...
--twitter.connection.consumerSecret= ...
--twitter.connection.accessToken= ...
--twitter.connection.accessTokenSecret= ...
--
And here is a example pipeline that uses twitter-message:
twitter-message-stream= TODO