Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Related to #1569982: Integrate with Libraries API somewhat, 6.x-3.x has diverged from 7.x-3.x
Comment | File | Size | Author |
---|---|---|---|
#1 | twitter-1820292-update_twitter_lib_6.x.patch | 9.86 KB | xurizaemon |
Comments
Comment #1
xurizaemongit diff 6.x-3.x:twitter.lib.php origin/7.x-3.x:twitter.lib.php
Comment #2
xurizaemonshould this be retained?
this needs to stay
we still have old-style auth, presumably only for twitter-compatible use?
this might want to stay, unsure how to repro?
always auth now
that's an older workaround for #985544 and should go
configuration API version, not sure if there's an issue for this. makes sense if we have a Twitter class which speaks to multiple API versions at once? or...?
probably we don't need $this->password there any more?
Comment #3
xurizaemontested 7.x-3.x twitter.lib.php in 6.x-3.x, it doesn't authenticate to post tweets, prob need some additional updates to bring the two branches into sync
Comment #4
xurizaemon6.x-3.x catches exceptions in Twitter::call().
7.x-3.x did not; instead it was catching them in twitter_post_node_insert().
I think the 6.x-3.x approach was more correct. Have improved on it slightly.
* In Twitter::status_update(), we do not return a TwitterStatus object unless twitter::call() was successful.
* Update other calls to $this->call() to behave similarly.
* In twitter_post_node_insert() we check the result of twitter_set_status() rather than using a try/catch block, because that happens at the API layer.
See 4bc89ca (7.x) and 71e5664 (6.x) for changes.
Comment #5
juampynr CreditAttribution: juampynr commentedGreat work @grobot!
Could you have a look at https://github.com/juampy72/twitter-rest-php and tell me if there are any missing changes at the library? I made you a collaborator of the project so you have commit permissions there.
Comment #6
juampynr CreditAttribution: juampynr commentedBy the way, the overall idea is that since March 2013 Twitter REST 1.0 will be turned off, meaning that all Twitter module versions prior to 7.x-4.x and 6.x-4.x won't work even though they use OAuth. This is the reason why I took the chance to upgrade the library and move it out of the module in order to be shared among the different Drupal versions (soon we will have a Drupal 8 branch) and even other Twitter modules.
Comment #7
xurizaemonNo objection to making twitter.lib.php available elsewhere under a more permissive license, but I don't see any advantage in requiring people to install it separately. IMO this complicates the install process (already hard enough for users), and without any benefit for users of twitter module.
My recommendation is to keep the library included in the module in 7.x-4.x. I commented on this previously in #1569982-6: Integrate with Libraries API, re-posting here for discussion -
Comment #8
juampynr CreditAttribution: juampynr commentedtwitter.lib.php has been reincorporated into the module and now matches the one at 7.x-5.x