Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDirect message new API returning NULL #714
Comments
This comment has been minimized.
This comment has been minimized.
hlashish
commented
Sep 16, 2018
•
This comment has been minimized.
This comment has been minimized.
|
Try |
This comment has been minimized.
This comment has been minimized.
hlashish
commented
Sep 17, 2018
•
Hi |
This comment has been minimized.
This comment has been minimized.
|
I don't see any obvious reasons why this wouldn't work. Two things that to check is that you are using the latest version of TwitterOAuth and that the person you are sending the DM to has authorized the sender to contact them. |
This comment has been minimized.
This comment has been minimized.
ozgurky
commented
Sep 26, 2018
|
There is a space end of new message endpoint, checking actual code for this space can be helpful maybe. Also this space exists in the JSON data part of https://twitteroauth.com/ main page doc.
|
This comment has been minimized.
This comment has been minimized.
|
Ya, the extra space at the end of the path will likely cause issues. |
This comment has been minimized.
This comment has been minimized.
hlashish
commented
Sep 30, 2018
|
I have removed the extra space still the same issue exists, do anyone is still facing the null return value issue ( |
This comment has been minimized.
This comment has been minimized.
|
I just copied the code you have and there are multiple places with with trailing spaces. After fixing them sending direct messages worked fine.
|
abraham
added
the
Waiting on
label
Oct 2, 2018
This comment has been minimized.
This comment has been minimized.
CesarNatic
commented
Oct 3, 2018
•
Im facing the same issue.
$data is correct, but $tw returns null, if i put the old endpoint i get a response from the twitter api but if i put the new endpoint i get a null and this error: Array to string conversion [APP/Vendor/twitteroauth/twitteroauth/twitteroauth.php, line 223] |
This comment has been minimized.
This comment has been minimized.
hlashish
commented
Oct 3, 2018
•
|
HI @abraham Thanks for all the help and time you invested for my code debugging. It started working now. Again thanks a lot for all your help and cooperation :) |
hlashish
closed this
Oct 3, 2018
This comment has been minimized.
This comment has been minimized.
CesarNatic
commented
Oct 3, 2018
What you did to solve it? |
This comment has been minimized.
This comment has been minimized.
|
@CesarNatic this API is only supported in version 0.9 and later. |
This comment has been minimized.
This comment has been minimized.
CesarNatic
commented
Oct 4, 2018
|
Thanks so much @abraham, updated to last version and worked like butter. :) Nice library btw. |
This comment has been minimized.
This comment has been minimized.
awadhajj
commented
Nov 14, 2018
•
|
Am using 0.9.2, and still receiving NULL response!
` am sending to a user that following me, and i always contact him through Direct Meassage :( |
This comment has been minimized.
This comment has been minimized.
|
@awadhajj Your API path string has a space in it |

hlashish commentedSep 16, 2018
•
edited
Hi Sir
I am using the following code and library functions to use twitter API's
Always it returns NULL for each library, please guide me how to run the to fetch various API result and send the direct message event new.