php - Twitter feed showing "No items." - possible change in API? -
this question exact duplicate of:
on home page of site, have content slider features recent tweet. lately i've noticed instead of showing tweet, shows "no items." wondering why has happened , how repair?
<ul> <?php if ($maxitems == 0) echo '<li>no items.</li>'; else // loop through each feed item , display each item hyperlink. foreach ( $rss_items $item ) : ?> <li> <a href='<?php echo $item->get_permalink(); ?>'> <?php echo $item->get_title(); ?> </a> </li> <?php endforeach; ?> </ul> include_once(abspath . wpinc . '/feed.php'); $rss = fetch_feed('https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=frshstudio'); if( ! is_wp_error( $rss ) ) { $maxitems = $rss->get_item_quantity(1); $rss_items = $rss->get_items(0, $maxitems); } ?>
the twitter v1 api no longer active, such need modify app use v1.1 api documented @ https://dev.twitter.com/docs/api/1.1
a big difference requests no longer throttled ip api key
Comments
Post a Comment