May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, you'll learn how to send a private message to another Twitter user from a Spring web application. Note that the user who is the recipient has to be a follower of the user who is the sender.
This recipe uses the code from the Connecting to Twitter recipe.
In the TwitterController class, in the tw() method, use the Twitter object to send a private message to another Twitter user:
twitter.directMessageOperations().sendDirectMessage("jeromejaglale", "Hey Jerome, I'm just testing your recipe.");Read now
Unlock full access