Skip to content

Instantly share code, notes, and snippets.

@LinzardMac
Last active December 11, 2015 22:28
Show Gist options
  • Save LinzardMac/4669877 to your computer and use it in GitHub Desktop.
Save LinzardMac/4669877 to your computer and use it in GitHub Desktop.
$tweetq= pods('twitter_resources');
$tweetq->find();
while ( $tweetq->fetch() ) :
$fromname = $tweetq->field('from_user');
$categorize = $tweetq->field('categorize');
# Get only recent strings from twitter to avoid pulling dupes
$max_id = get_option('ttp_max_tweet_id', 0);
// Fire the HTTP request to Twitter
$response = wp_remote_get('http://search.twitter.com/search.json?q=from:'. urlencode($fromname) .'&result_type=recent&rpp=10&since_id='.$max_id);
endwhile;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment