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.
However this may sound stupid, it would be quite handy to allow following of more accounts (yes, I know it can be done other way) but couldn't you provide that $twitkey is array of keys (and each key with array of hashtags) so when the module fetch tweets it iterates though array with foreach.. and returns tweets to be processed in a time sorted list?
Just an idea but could be that it is overkill for this module...
Comment | File | Size | Author |
---|---|---|---|
#5 | twitter_pull-multiple-twitkeys-working-arrays-1647302-5.patch | 2.65 KB | dabl |
#4 | twitter_pull-multiple-twitkeys-working-arrays-1647302-4.patch | 2.69 KB | dabl |
#2 | twitter_pull-multiple-twitkeys-1647302-2.patch | 2.07 KB | wbobeirne |
#1 | twitter_pull_multiple.zip | 11.81 KB | al_loja |
Comments
Comment #1
al_loja CreditAttribution: al_loja commented+1 for this feature request.
I hacked the code to do this (see attachment).
You can see the result here: http://www.vkw.be - it's on the right hand side of the home page).
usage example: twitter_pull_render('@inadarei,@Dries,#drupal8', 'Title', 10);
[as you can see, you pass a comma separated list of twitter accounts and tags]
It would be nice to integrate this in the main trunk.
Comment #2
wbobeirne CreditAttribution: wbobeirne commentedGreat idea! I can definitely see the use in this. I've written a patch that makes twitter_pull_render deal in arrays of twitkeys, rather than strings. If a string twitkey is passed in, it converts it to an array so that there's a consistent format. For the most part, I don't see this breaking any functionality, except for the fact that $twitkey in the tpl is now an array rather than a string. Attached is the patch.
Comment #3
mstef CreditAttribution: mstef commented$twitkey gets passed into base64_encode() on line 99. That function takes a string, but now it can be an array. You'll have to adjust.
I'd also recommend caching based on the entire twitkey, so if you request an array, we only need to make one trip to the cache.
Comment #4
dabl CreditAttribution: dabl commentedI've made a patch that runs lazy_id in a foreach to use the twitkey array. This works for me!
Comment #5
dabl CreditAttribution: dabl commentedAdded a new patch without the silly directorys. Sorry for that!
Comment #6
joachim CreditAttribution: joachim commentedIf you want a list of tweets from several accounts, create a list on twitter and then show that.
Comment #7
Danny Englander@ joachim - What would the syntax be for pulling in a list? I don't see any documentation on that. Thanks, sounds like a good solution!
Comment #8
jags880 CreditAttribution: jags880 commentedBut you can't do that if you want multiple hashtags, searches, and accounts in the same feed. If you wanted just accounts that would work.
Comment #9
joachim CreditAttribution: joachim commentedI think at that point, you want more than just a feed from Twitter. You're making your own aggregation. I think that's beyond the scope of this module.