1 <?php
//When called, make a request to pull a tweet from an SQL table
2 require_once("class/queue-database-construction.php");
3 $construction = new QueueDatabaseConstruction();
5 $oldest = $construction->retrieveOldestEntry();
6 echo "<br/>" . var_dump($oldest);
10 require_once("class/twitter-connection.php");
12 $connection = new TwitterConnection();
13 $response = $connection->makeTweet($oldest[0]["Comment"], explode(",", $oldest[0]["ImageLocation"]));
15 echo $oldest[0]["Comment"] . "<hr/>";
16 if($response["created_at"] === null){
17 echo "post unsuccessful";
21 $construction->deleteOldestEntry($oldest);
22 echo "Found, Added and Deleted<br/>";