Feeds, the successor to FeedAPI, is shaping up to be an awesome module. I am planning to use it in many, many applications, including retrieving feeds from Twitter, making video channels from YouTube, and importing credit card transactions from CSV.
A few days ago I posted about using Drupal to analyze Twitter data, and since then I've been thinking on how to implement this functionality using Feeds. Turns out some functionality is missing for a truly general solution, the first of which is retrieving private feeds. Feeds OAuth is my solution to this sub-problem.
Feeds OAuth provides a new Feeds fetcher plugin OAuthHTTPFetcher
that performs OAuth authorization before requesting a feed. Here's how it works:
http://example.com/feeds/oauth/callback/twitter
. The last part of the URL will be called the site identifier, in this example twitter.http://example.com/admin/build/feeds/create
, specifying the fetcher to be of type OAuthHTTPFetcher. In the fetcher settings, enter the standard OAuth information (consumer key, consumer secret, various URLs) as well as the site identifier entered above.That's it! You can check out a demo of Feeds OAuth in action. Now on to paging and custom field mapping :-)
Comments
There doesn't seem a way to grab twitter xml's even after succesful authentication. My XML parser keeps telling me Invalid protected resource url length. Authentication worked.
Please use the Feeds OAuth issue queue to report problems. It's easier to track them over there.
You will need to have PECL Oauth installed; which can be a bit of a problem on shared hosts
http://pecl.php.net/package/oauth