Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Forum: Plugins
    In reply to: Twitter Tools not updating

    The plugin has been updated to v2.2 to include this fix 🙂

    Still not sure why the digests haven’t been working. Played around with it a bit and managed to manually get it to update for past dates, so now that it’s back in sync maybe it will be OK going forward?

    Forum: Plugins
    In reply to: Twitter Tools not updating

    No daily digests yet, but the tweets in the sidebar are up to date now, and refresh correctly.

    Forum: Plugins
    In reply to: Twitter Tools not updating

    Found a way to fix it by converting the ID numbers to strings before calling json_decode (thanks to this question & answers on stackoverflow.com). See below for edit to twitter-tools.php in /wp_content/plugins/twitter-tools:

    $data = $snoop->results;
    
    	// hash results to see if they're any different than the last update, if so, return
    	$hash = md5($data);
    	if ($hash == get_option('aktt_update_hash')) {
    		update_option('aktt_last_tweet_download', time());
    		update_option('aktt_doing_tweet_download', '0');
    		do_action('aktt_update_tweets');
    		return;
    	}
    
    	//CJW 2010-01-25: Fix problem with json_decode limiting the id values to PHP_INT_MAX
    	// Convert id numbers to strings, with thanks to http://stackoverflow.com/questions/1777382/php-jsondecode-on-a-32bit-server
    	$data = preg_replace('/"id":(\d+)/', '"id":"$1"', $data);
    
    	$tweets = json_decode($data);

    So now my tweets are being updated correctly, will need to wait till tonight to see if my daily digest post is created correctly. 🙂

    Forum: Plugins
    In reply to: Twitter Tools not updating

    This looks like a problem with json_decode. I put some logging code in the Twitter Tools code that does the tweet updates, and while the data returned from Twitter includes ID numbers like 8014259753, once these are decoded via the call to json_decode() they are all turned into 2147483647. As far as I can see this is happening within the native PHP implementation of json_decode in PHP v5.2.3 (tested with a v. simple PHP page), so perhaps this is now happening due to the changes in Twitter Tools v2.1, v2.1.1, and v2.1.2 which seem related to changing whether Services_JSON is called or not?

Viewing 4 replies - 1 through 4 (of 4 total)