DrupalCon Seattle's schedule is live!
Don't miss out on a great lineup from April 8-12, 2019.
Posted by infojunkie on , updated
This project is not covered by Drupal’s security advisory policy.
Feeds OAuth provides a new Feeds fetcher plugin that performs OAuth or OAuth 2.0 authorization before requesting a feed.
INSTALLATION
- Requires PHP 5.3+
- Install php-proauth in sites/all/libraries using the following:
git clone https://github.com/infojunkie/php-proauth.git
USAGE
- Obtain standard OAuth information from provider: consumer key, consumer secret, request token URL, access token URL, authorize URL.
- Create a new Feeds importer and select the fetcher to be of type OAuthHTTPFetcher or OAuth2HTTPSFetcher.
- In the fetcher settings, enter the OAuth information above, as well as a unique site identifier that represents the provider (e.g., twitter).
- When saved, the configuration screen will show you a callback URL: add it to the provider's configuration for your Drupal site.
- Associate the new importer with a content type.
- When you create a new node of this content type, the form will warn you that you haven't received an authorization from the provider. Click the link to do so and complete the authentication steps.
- OAuth 2.0: you can also enter a
scopeargument that gets sent during authorization, to request special permissions from the provider. - You're now ready to create new feeds from your protected data!
COMPATIBILITY WITH OTHER OAUTH MODULES
- Other modules, such as Twitter Signin, already provide OAuth authentication and store tokens in their own tables. Feeds OAuth must be able to retrieve the tokens stored by those third party modules. To do so, a new hook
hook_feeds_oauth_authenticatoris used. Here's the implementation for Twitter Signin:<?php function twitter_feeds_oauth_authenticator() { return array('twitter_get_tokens' => 'Twitter'); } function twitter_get_tokens($uid, $site_id) { return db_fetch_array(db_query("SELECT oauth_token, oauth_token_secret FROM {twitter_account} WHERE uid = %d", $uid)); } ?> - Feeds OAuth is known to be incompatible with OAuth module due to a naming conflict in their respective OAuth libraries. This will be fixed when Feeds OAuth moves to using Guzzle to consume feeds.
Project information
- Module categories: Content, Import/Export, Third-party Integration
387 sites report using this module
8,370 downloadsThis project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Downloads
7.x-1.0-beta3
✓ Recommended by the project’s maintainer.
⬇ Download tar.gz (14.18 KB) | zip (17.43 KB)
Development version: 7.x-1.x-dev updated 19 Mar 2015 at 19:18 UTC