getAllTweetIds(); function getConnectionWithAccessToken($cons_key, $cons_secret, $oauth_token, $oauth_token_secret) { $connection = new TwitterOAuth($cons_key, $cons_secret, $oauth_token, $oauth_token_secret); return $connection; } $connection = getConnectionWithAccessToken($consumer_key, $consumer_secret, $user_token, $user_secret); $temp=array(); if($allTweetIds) { $index=0; $count=0; $tweetIdsArray=array(); foreach($allTweetIds as $id) { if($count<100) { $tweetIdsArray[$index][$count]=$id->tweet_id; } if($count==99) { $index++; $count=0; continue; } $count++; } foreach($tweetIdsArray as $idArray) { $ids=""; for($i=0;$iget($requestUrl); $response=json_decode(json_encode($tweets->id),true); for($i=0;$iget("https://api.twitter.com/1.1/statuses/show/'$tweetId'.json"); $check_response=$check_tweet->errors; $check_code=$check_response[0]->code; if($check_code==34) { $objTweet->status='Y'; $objTweet->id=$tweetId; $objTweet->updateTweetStatus(); } } } } } ?>