This happens, because Twitter stopped the API v1. To get around WP_Error
in your code:
// functions.php
function fetch_twitter()
{
$rss = fetch_feed('https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=BarackObama');
if ( is_wp_error( $rss ) )
return;
// continue in your function
$maxitems = $rss->get_item_quantity(3);
}
// template
fetch_twitter();
Won’t help much in your case. Switch to the new API.
Related Posts:
- Get all posts in RSS
- How to get SimplePie fetch_feed without stripping iframe code?
- Remove or Edit in Feeds
- Cannot get add_feed to work
- Should I provide RSS or Atom feeds?
- Why does Simplepie return feed items in a wrong order?
- How to create additional full text RSS feeds
- Custom RSS feed forces download
- Multiple category RSS feeds
- How to flush feed? Or set timeout on feed so that it isn’t cached?
- How to get the last updated date of a post from a WP RSS feed?
- How to remove published date from RSS feed
- Disable only the main feed?
- WordPress Add [cdata] to title tag in rss feed
- A function to fetch blog content via rss feed
- RSS feed site image custom resolution
- How to add featured image or custom field to xml feed?
- Difference between the 4 Built in RSS Feeds?
- How to get more than 25 items via Simplepie RSS Feeds?
- RSS Feed Behaviour (Inc. Feedburner)
- How can I minimize the content of my RSS feed to fit more items in Feedburner’s 512k limit?
- Two RSS feeds, different items limit?
- How to Create RSS Feeds for categories in WordPress?
- Importing multiple RSS feed into WordPress and sorting them by date
- Delaying One RSS Feed in WordPress but Not the Others?
- Custom RSS does not work for categories and tags
- how improve website mainpage loading
- Add ![CDATA] to permalink rss
- How fetch_feed() works?
- Various WordPress Feeds for Same Blog
- How to set the cache for the built-in SimplePie feed parser?
- Help needed to make my site as Aggregator
- Custom RSS feed with custom url
- Showing Post ID on RSS
- WordPress – Sync wordpress post with JSON feed
- fetch_feed works on localhost but not on server
- WordPress appends RSS item with unwanted content
- Feed only showing 1 result? [closed]
- Where does WordPress default SimplePie save cache data?
- How to Fetch Rss Feeds From Other Websites
- Feed links not working even with add_theme_support(‘automatic-feed-links’)
- Is there a way to fetch RSS feed by date range rather than number of items?
- RSS Feed Empty in Firefox
- fetch_feed returning rss feeds on same server as empty
- Remove ‘More..’ link from RSS feed
- Feed error: A feed could not be found at youtube.com/… (1 post) [closed]
- Getting Thumbnail in fetch_feed from custom field
- How do I use fetch_feed() to pull in a large number of posts?
- Create an RSS feed of all posts
- Passing feed URLs with “&” to fetch_feed()?
- Empty RSS Feeds
- Reply via email (mailto link) in RSS feed at the end of each post
- Second page of RSS feed
- RSS/Atom feeds invalid, “Mismatched tag” errors
- How to make an RSS feed to show most viewed posts for last 24 hours?
- WordPress RSS feed?
- fetch_feed showing only first item
- RSS feed widget for specific categories with latest posts?
- WordPress won’t let me use a page slug of ‘feed’
- WordPress keeps truncating my feeds and I can’t stop it
- Showing RSS feed via fetch_feed. How to show the site title of the feed?
- Style wordpress image captions in RSS
- My WordPress installation isn’t updating the feed when a new post is published
- RSS feed error stopping parsing of page template
- Use Feedburner instead of default feed on WordPress.com?
- What is the difference between these GUID’s in wordpress feed?
- Change pubDate in rss feed in another format
- How to remove private posts from RSS feeds?
- RSS – This XML file does not appear to have any style information associated with it. The document tree is shown below
- RSS feed has stopped updating
- Fetch feed from multiple sources
- Theme’s functions.php not called when rendering RSS feed
- Modify RSS feed to change iframe structure
- RSS Feed cURL error 52?
- Update postdata without creating duplicate on wp_insert_post from RSS feed
- Adding a second RSS feed
- How to import and parse RSS feed from a WP site to a non-WP if ‘allow_url_include’ is set to ‘off’?
- RSS Feed Broken – Limit?
- wp_head hook content showing up at top of RSS feed
- Show posts without content in RSS 2 FEED
- are there any downsides to increasing the number of most recent items in a feed
- RSS2 Feed with two CDATA sections
- How to make my feed tidy
- RSS feed not displaying excerpt text?
- Create a “feed” from one WordPress site to another?
- RSS Feed Custom Title? (code placing) [duplicate]
- RSS feed – get specific item from external feed
- Embedded Feed Update
- How to add the Author on my RSS Feed
- RSS Subscriber count
- images are broken
- WordPress Plugins Feed Error, but I’m not asking for a plugins feed
- WordPress not showing the latest articles in RSS feed
- Editing wp-includes/feed.php
- WordPress Feed Error [closed]
- Set RSS feed update time
- Is fech_feed() use lots of server resourses?
- Remove or truncate site rss in
- How do I get an RSS feed to work
- How to get recent posts from wordpress RSS feed