3
votes

I'm using twitter api with OAuth.

When I try to check tweet that i sent with this API, if tweet is exists API works fine. But if i deletede a tweet that posted by API, tweet check response always give me:

            (
                [message] => Sorry, that page does not exist
                [code] => 34
            )

response.

I'm trying with this code block:

$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $userKey, $userKeySecret);
$postResult = $connection->get('statuses/show', array('id' => "209985431515828224"));

1 month before this API works fine and it will give me "No status found" response but now it gives that error.

Is this a bug or this is default response for deleted tweets?

1
Is the tweet actually deleted after you make that call? - Terence Eden
No. I think you didn't understand scenario. Full scenario is: My system update user status (send tweet as user). User delete this tweet from twitter on twitter.com or other client. And i check this tweet that exists and system gives me that error - hardc0der
It appears that Twitter have updated their response. Deleted tweets show the 404 error - Terence Eden
Hi Terence, is this information is real oy you guest as this? - hardc0der
I can't find any information on the Twitter website, but their console is now returning 404 for deleted items, users who don't exist, etc. - Terence Eden

1 Answers

4
votes
  1. Make sure you're using the right API method: GET statuses/show/:id
  2. Make sure the Tweet still exists
  3. Make sure that you always rely on id_str

Example using abraham's twitteroauth method from: https://github.com/abraham/twitteroauth

$valid_id_str="209985431515828224";

$parameters = array('trim_user' => 1 );

$status = $connection->post('statuses/show/'.$valid_id_str,$parameters);