I want to list the tweets that the global account has marked as favourites in twitter

CommentFileSizeAuthor
#7 twitter-favorites-1850542-7.patch22.12 KBkerasai
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

juampynr’s picture

Title: ability to retrieve favourite tweets fron account » Add ability to retrieve favorite tweets from a Twitter account

Started working on it at branch 1850542-favorites. As one tweet can be favorited by more than one account I may need to create an extra table with fields relation, screen_name, status_id.

juampynr’s picture

kerasai’s picture

Is anything happening with this? I need this functionality and am planning to roll a version against 7.x-5.x. Any guidance?

juampynr’s picture

@kerasai, not yet. It is kind of tricky because we need to keep track of the relationship of favorite tweets for each user.

Patches are welcome.

kerasai’s picture

I was more concerned on logic for deleting tweets. If all tweets are deleted for a user, have to keep tweets that others have favorited, etc...

Unless you object I'm going to plan on developing it as a separate module. That way it can be included as a sub-module. If desired to integrate into the main Twitter module, it would also be fairly easy to integrate the code at that point.

kerasai’s picture

Version: 7.x-4.x-dev » 7.x-5.x-dev

An update on this, I began developing as a separate sub module but the twitter_account_list_form() and related theme function aren't dynamic enough to handle rendering the extra fields. I'd rather have this separate but I'm not ambitious enough to tackle the changes necessary to make the rows flexible to work with a form_alter at this time. I'm going to rework this as a patch to the twitter module based on #2. I hope to have a chance to work on that some tomorrow.

kerasai’s picture

Status: Active » Needs review
FileSize
22.12 KB

Patch attached. Working to suit my requirements, only drawback is there's no way to "unfavorite." Twitter's API imposes some limitations on tracking favorites going back in time. If you have any ideas on how to handle this let me know and I'll look into it further.

This is mostly the work you started in #2 with a bit built out to adjust schema, adjust account config, CRUD for tracking favorites, and Views integration. I tried to focus only on changes for this "favorites" functionality, but there were a few busted links in the admin screens, etc that I also touched up. A few other changes done by the IDE which is set to enforce Drupal coding standards--take them or leave them.

juampynr’s picture

Status: Needs review » Closed (won't fix)

twitfaves module offers a block with favorite tweets using the Twitter module authentication and API.

This is a working solution until a better fix has been implemented. However, I am pushing for moving twitfaves as a contrib module of Drupal.org.