<?php

ini_set('display_errors', 1);
require '../../../wp-blog-header.php';

set_time_limit(200);
function return_300($seconds) {
  // change the default feed cache recreation period to 2 hours
  return 300;
}

add_filter('wp_feed_cache_transient_lifetime', 'return_300');


require_once 'TwitterAPIExchange.php';

$url = 'taylorswift13'
$settings = array(
    'oauth_access_token' => '2801768273-ge830mVwYOV8YXvwyd8ntDUUz91hWwNnODboGsr',
    'oauth_access_token_secret' => 'PYU53JF0JKooWHDXrYiSRTOdTotwrDsYy6dM4ru0AtpO0',
    'consumer_key' => 'TCIVlEJgaO6lPPhwnq3NuVxxE',
    'consumer_secret' => 'Fd8U40Ppg6XAWzs6KKt1f56uA4wfTCXs46oXLCtl0A6DUEcujn',
  );
  $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
  $requestMethod = 'GET';

  var_dump($settings);

  $twitter = new TwitterAPIExchange($settings);
  $tweets = $twitter->setGetfield('?screen_name=' . $url)
    ->buildOauth($url, $requestMethod)
    ->performRequest();

  var_dump($tweets);
