You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can any one tell me the proper way now to use twitter-api-php to call this new DM create endpoint in order to send DMs? I just need a little help to patch my project.
As of now, using buildOauth->setPostfields->performRequest (like I was) suddenly results in a PHP warning "rawurlencode() expects parameter 1 to be string, array given"
I've also tried using buildOauth->performRequest, then setting the headers and post fields manually with CURLOPTs in the peformRequest params. This doesn't generate the warning but gets an authentication error back from the Twitter API (which is weird, because the other functions of this project still successfully use these same API keys/secrets just fine).
Thanks in advance.
The text was updated successfully, but these errors were encountered:
The Twitter endpoint for sending a DMs was retired on September 17th, and replaced with a new one (direct_messages/events/new.json https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event), as did the post fields required to send one. Breaking the code in my project.
Can any one tell me the proper way now to use twitter-api-php to call this new DM create endpoint in order to send DMs? I just need a little help to patch my project.
As of now, using buildOauth->setPostfields->performRequest (like I was) suddenly results in a PHP warning "rawurlencode() expects parameter 1 to be string, array given"
I've also tried using buildOauth->performRequest, then setting the headers and post fields manually with CURLOPTs in the peformRequest params. This doesn't generate the warning but gets an authentication error back from the Twitter API (which is weird, because the other functions of this project still successfully use these same API keys/secrets just fine).
Thanks in advance.
The text was updated successfully, but these errors were encountered: