Authorizing request POST DirectMessage

java

#1

Hello,

I want to make request to the Twitter api to send direct messages, i’m having trouble since i have a error 401. I have severals questions :

Thank you very much


#2

Please, i still need help


#3

You have to use three-legged authentication with a user context in order to send Direct Messages. Application-only authentication has no user context, so it would not be possible to identify which user was sending a message to which other user.


#4

Thank you. Three-legged authentification isn’t convenient for me as my service doesn’t include a HCI.

what i want to do is :

  • A user wants to be contacted, he types his screen_name.
  • The web service send the screen_name to me.
  • I receive the screen_name, and post a direct message to him (if he doesn’t have the option “receive dm from anyone” activated he won’t get the message).

I am a little lost, i know it’s a lot but i’d appreciate it if someone could help me