J7mbo / twitter-api-php

The simplest PHP Wrapper for Twitter API v1.1 calls
MIT License
1.82k stars 802 forks source link

Can not send direct message #297

Closed ZarchiMohammad closed 2 years ago

ZarchiMohammad commented 3 years ago

I wrote this code:

ice_screenshot_20210128-173026

and give this error: {"errors":[{"code":32,"message":"Could not authenticate you."}]}

My permissions: Read, write, and direct messages Also i have this error on TwitterAPIExchange class: PHP Warning: rawurlencode() expects parameter 1 to be string, array given in .../TwitterAPIExchange.php on line 325

What am i do?

Schiocco commented 2 years ago

Same issue (PHP Warning: rawurlencode() expects parameter 1 to be string, array given). It doesn't work for arrays of arrays as post_field (in Postman you need to send the array as plan text(raw) body), if I do the same via this class, the signature broken and the error is {"errors":[{"code":32,"message":"Could not authenticate you."}]}