Invalid argument supplied for foreach() in wp-twitter-widget.php
I have some problem: installed Twitter Widget Pro (http://wordpress.org/extend/plugins/twitter-widget-pro/) on wordpress-based website and seems on first time all works fine.
But after refresh of page in browser I will get error
Warning: Invalid argument supplied for foreach() in /var/www/cebit/sites/dev/public/wp-content/plugins/twitter-widget-pro/wp-twitter-widget.php on line 513
I have debugged this line and found that:
$tweets = $this->_getTweets( $args );
return only ":" I'm using latest version of plugin (2.3.4). Can our help or or say what can I done wrong? Maybe some error in server configuration or something other?
Thanks in advance, Alexander!
Answer
Solution:
Looks like there are not tweets - probably twitter is down or your server has some limit on the number of queries to be run to outside services (or limit of the twitter service itself).
Some users have reported issues with http and https calls, you might want to check this out - http://wordpress.org/support/topic/plugin-twitter-widget-pro-no-tweets-available?replies=12
Answer
Solution:
If it's an HTTP vs HTTPS issue, the new version (2.3.5) has a new setting on the Twitter Widget Pro setting page that lets you specify HTTP if you want.