Вопрос

Is it possible to send a direct message with Twitter api and make the app name appear as sender?

I can send the direct message using the "Access token" and "Access token secret" that is in the "OAuth tool", but these messages are sent from my own Twitter account (the one that I used to create the app).

Это было полезно?

Решение

No, Twitter's documentation for new direct messages here says that the api:

Sends a new direct message to the specified user from the authenticating user

so the app must send the direct message from a user and not from the app (the info box on the right of the docs says "requires user context").

The only way to make your app appear as sender would be to create a Twitter account with the app name but the user that receives this message would have to follow your app first to be able to receive the message.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top