Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Import a list of tweet ids into Twitter Tools/WordPress.
foreach (file('/tweet-ids.txt') as $tweet_id) {
$tweet_id = trim($tweet_id);
$url = home_url('index.php').'?'.http_build_query(array(
'aktt_action' => 'import_tweet',
'tweet_id' => $tweet_id,
'social_api_key' => Social::option('system_cron_api_key')
), null, '&');
// error_log('Importing tweet '.$tweet_id.' '.$url);
'timeout' => 0.01,
'blocking' => false,
'sslverify' => apply_filters('https_local_ssl_verify', true),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.