Displaying tweets using API 1.1 with PHP in wordpress without plugin


#1

How can I change this PHP to work with new Twitter API v1.1.
Obviously it was working swell until today when it completely broke 3 sites which were using it. :frowning:

Thanks in advance for the help.


<?php
				//Path to include feed.php file located in wp-includes folder.
				include_once(ABSPATH . WPINC . '/feed.php');
					
				//Feed URL
				$twitterID = get_option('solostream_twitter_username');
				$rss = fetch_feed('http://api.twitter.com/1/statuses/user_timeline.rss?screen_name='.$twitterID);

				$tweetnumber = get_option('solostream_twitter_feed_number');
				$maxitems = $rss->get_item_quantity($tweetnumber);

				$firstitem = 0; /** Specify the first item. 0 to start from the newest tweet. **/
				$rss_items = $rss->get_items($firstitem, $maxitems);
				?>
					<ul>
						<?php
						if ($maxitems == 0)
							echo '<li>No Tweets Yet!</li>';
						else
							//Loop through each feed item and display it as a link.
		        foreach ( $rss_items as $item ) { ?>
						<li>
							<img src="http://api.twitter.com/1/users/profile_image?screen_name=<?php echo get_option('solostream_twitter_username'); ?>" /><!-- Get the tweet item date.--> <span><?php echo $item->get_date(); ?>
						</span><br /> <!-- Get the tweet item title as an external link.-->
							<a href='<?php echo $item->get_permalink(); ?>' target="_blank"
							title="External Link&#8230;" rel="nofollow"> <?php echo $item->get_title(); ?>
						</a>
						</li>
						<?php } ?>
</ul>


#2

Did you get a response for this? I have the same problem with embeded code on my site.
Any help is greatly appreciated!


#3

jhgkk