Invalid argument supplied for foreach() in [Twitter widget WordPress API]

Im currently developing a website for my exams. I only need a twitter ticker, and found a great plugin for WordPress.

Now the problemm is that i get the error stated below :

Read More

Warning: Invalid argument supplied for foreach() in /public/sites/www.wijkcoach.nl/wordpress/wp-content/plugins/twitter-feed-ticker/ag_twitterfeed_widget.php on line 53

The code stated in this line is as following :

foreach ($tweets->statuses as $entry) {
        echo '<a href="http://twitter.com/'. $twittername .'#stream-item-tweet-' . $entry->id_str . '" target="_blank">' . $entry->text . '<i>' . date('F d Y', strtotime($entry->created_at)) . '</i></a>';

}

Now i really need this to work or i wont pass my exams..

Thanks in advance.

EDIT

print($tweets) gives me the following error:

Parse error: syntax error, unexpected 'foreach' (T_FOREACH)

Related posts

Leave a Reply