Error while sending direct message


$url = “” ;
$res=$tweet->post($url, array(‘text’ => “$text”,‘screen_name’ => “$screen_name”));

stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => Sorry, that page does not exist [code] => 34 ) ) )

I am not getting what is the mistake.



This error code is related to a 404 status code returned by the request. Can you confirm if the URL is correct (from what you sent is OK, but your code may differ).

Also, please check if screen_name is equal to the user Twitter handle, not display name.


Thank You very much Luis.
Problem was with “screen_name”.
I used specific handle @*.
Now its working fine.

Thank you Very much.