Reviewing how the twitter module use the oauth module I have seen that the only use that it mades from oauth is the http://code.google.com/p/oauth/ library. (twitter.lib.php class TwitterOauth that uses OAuthSignatureMethod_HMAC_SHA1, OAuthConsumer classes from OAuth.php library).
There is no use of any oauth module API or oauth function or oauth module feature.
Indeed if we included this library in the twitter module itself we should avoid installing unnecesary modules but as it could drive to conflicts with other modules doing the same I agree that it sound better to use the existing oauth_common module that centralizes this library.
This patch only change the loading library from the oauth 2.x to the new oauth_common 3.x version.
I couldn't see any incompatibility from using the 3.x or 2.x because there is no any use from the modules code. Common_oauth use a oauth project library from r1231 instead than r666 from 2.x, http://code.google.com/p/oauth/source/list?path=/code/php/OAuth.php&star...
so it fixes some bugs.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | twitter_3.x_oauth_3.x-125510-1.patch | 4.79 KB | steinmb |
| #3 | twitter_3.x_oauth_3.x-125510.patch | 3.88 KB | splash112 |
| twitter_3.x_oauth_common.patch | 3.82 KB | jcmarco |
Comments
Comment #1
michaek commentedThis looks totally awesome. I'll apply, test, and push as soon as I get a chance!
I honestly hadn't looked into this issue at all, because I'd assumed if the previous maintainers hadn't done it, it must be a thorny issue, and I should wait until I had some time to spend on it. Thanks for taking this on!
Comment #2
splash112 commentedTesting!
Btw, change the dependency to oauth 3.x seems to make sense, as it is now the recommended version.
Comment #3
splash112 commentedSeems works fine here. Had to patch by hand because jcmarco's test didn't apply.
So attached new patch against latest 3.x dev.
Comment #4
michaek commentedThanks, @splash112. I'll test it and get it rolled into a release. This issue is a big deal!
Comment #5
splash112 commentedWelcome, keep up the goods work with this very nice module!
Comment #6
splash112 commentedBtw, for oauth you will need to completely delete the old module before uploading the 3.x module.
Comment #7
michaek commentedThanks, I'd do that anyway, as it's standard for upgrading modules. (Plus, it's what `drush dl` does. :) )
Comment #8
michaek commentedTested. This will shortly be released in the dev version. I would love for a few people to test it in the meantime, but I'll probably trigger another beta release in a few days! Thanks to both of you!
Comment #9
socialnicheguru commentedI can confirm that this works with Oauth 3
Comment #10
socialnicheguru commentedhas this been committed
Comment #11
steinmb commentedNot able to find any commits, reopening.
Comment #12
steinmb commented#3 does not apply cleanly anymore, re-rolling, though patch untested.
Comment #13
killua99 commentedtested, works correctly.
Comment #14
steinmb commentedFound #935196: Module should raise notices when it is not configured (preventing Twitter authentication failed message) in the issue q. We prob. should throw some warning that wrong version of OAuth is installed?
Comment #15
killua99 commentedYes but that is another issue, The first point of this issue is to make a patch to use the Oauth v-3.x and that task is done. Now we need to handle the protocol version, and another things more.
But for me this issue are "reviewed & tested by the community"
Comment #16
steinmb commentedJust checking :) Did also a quick test and think this is RTBC, yay. Oh happy days when both branches are using the same OAuth version! Let's get this commited!
Comment #17
juampynr commentedTests performed against patch #12:
I have committed a slightly modified version of the last patch given at comment #12.
http://drupalcode.org/project/twitter.git/commitdiff/1fb8848a68a5c1cc050....
I have also updated OAuth requirements at README.txt at http://drupalcode.org/project/twitter.git/commitdiff/a9a81e19afe146a0c7f....
By the end of the week I will release a new version.
Many thanks to everyone for the hard work.