The Twitter Tags module provides additional functionality to the Twitter module by parsing and saving hashtag data for Tweets as they're saved. The module is integrated with Views, so site builders can create lists of Tweets filtered by one or more tags. Also if the site is using the core Taxonomy module, taxonomy term data may be related to the Tweets for additional functionality.

Providing this functionality via the Twitter module is becoming more important as it's the defacto standard for integrating with Twitter's API. The ability to manage Tweets via hashtag data has been requested many times in the Twitter module's issue queue but there is still no suitable solution. Twitter Tags is a lightweight extension to provide this functionality.

Project page

https://drupal.org/sandbox/bmoresafety20/1943112

Repository

git clone http://git.drupal.org/sandbox/bmoresafety20/1943112.git twitter_tags
Please be sure to review the 7.x-1.x branch. I've also created a 7.x-1.0-rc1 tag representing the state of the code at the time of this submission.

Similar projects

  • Twitter Search - This module is used to query Twitter for certain text searches. It is not integrated with Taxonomy and only has a dev release for D7.
  • Twitter Block - This has been a popular way to display Tweets that contain a specific hashtag but is no longer functional because it has not been upgraded to utilize Twitter API v1.1.

Ventral.org review

http://ventral.org/pareview/httpgitdrupalorgsandboxbmoresafety201943112-...

Coder module review

Clean.

Security concerns

This should be a very low-risk module. It parses the text of a Tweet, saves hashtag data to the database, and provides it back via existing (vetted) Views functionality.

Reviews of other projects

Thanks.

CommentFileSizeAuthor
#11 twitter_tags_view.txt3.53 KBdsnopek
#1 twitter_tags_view.txt4.69 KBkerasai

Comments

kerasai’s picture

StatusFileSize
new4.69 KB

Quick steps to get see this running:

  1. Install Twitter, Twitter Tags, Taxonomy, and Views modules.
  2. Get some Tweets into your site. Run the batch process at admin/config/services/twitter/tags if you've got existing Tweets.
  3. Copy the text from https://drupal.org/files/twitter_tags_view.txt and use to import to a new View.
  4. Navigate to the page from the View (path is "twitter-tags"), and you will see a View with an exposed filter where you can filter by hashtag.
  5. The View also provides a block with a contextual filter for a taxonomy term. Put the block in a sidebar, and go to the term view page for a term and the View will display Tweets with the hashtag that matches the term's name.
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

mavin’s picture

Status: Needs review » Needs work

Hi,

I'm trying to enable your module, but for that I need to enable the Twitter module. Unfortunately, it depends on oauth_common module which has no release for D7.

kerasai’s picture

@mavin Use the the oauth_common module that is contained in the OAuth project.

kerasai’s picture

Status: Needs work » Needs review
mavin’s picture

OK thank you.
Maybe you should add a list of modules depending on yours in the description and README file.

pandaski’s picture

Manual review:

Better to add more module dependencies or requirements in info/install file.
Using the drush pm-enable twitter_tags finally got the following message:

No release history available for oauth_common 7.x. [warning]
Module twitter_tags cannot be enabled because it depends on the [error]
following modules which could not be found: oauth_common

Although it is a twitter module related issue, better to add the information in README.txt and project page.

oauth module could be added in the requirements to resolve the oauth_common issue. https://drupal.org/project/oauth

ayesh’s picture

Can this module handle multiple hashtags in a single tweet ?
In twitter_tags_set_tags(), it handles multiple hashtags but when it comes to display them, it seems that the View will show multiple rows for each hashtag found in a particular tweet.

For example, if there is a tweet "#omg #zombies", Views module will show this tweet in a single line. But as your views integration adds a simple join, it will cause Views to display this very same tweet twice, because there are 2 rows in twitter_tags table.
I could not test this yet (I'm not with my own laptop now) but as far as I can remember, this type of views join causes multiple rows.

Also, consider adding all the data in a single database query. db_insert function can handle multiple row inserts in a single database trip.

I will test this awesome work later and will post results.

kerasai’s picture

@Ayesh Thanks for taking a look.

Dependencies

I've updated the project page with additional information on the OAuth module needed for Twitter. I'll get it into the README the next time I'm in the code.

Views Integration

I see what you're saying with the join. Right now it's going to return duplicate rows only if you filter on multiple hashtags or you render data from the matching taxonomy term. I'll look into the handlers that the join is using yto see if there is a better solution for joining multiples.

DB Insert

I'll also take a look at inserting multiple rows in one shot. I wasn't aware that db_insert() provided that functionality.

Thanks again for reviewing, let me know if you see anything else worth a second look.

kerasai’s picture

Pushed a few changes into 7.x-1.x branch for the dependency information and the db insert. Coder review and Ventral are still happy.

Still looking into the Views integration part. I was hoping there would be a handler that would be usable as-is but that does not seem to be the case. I'm going to continue looking at that, worst case scenario I'll have to provide a custom handler that extends views_handler_field_prerender_list similar to how Taxonomy and other modules are implemented.

dsnopek’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new3.53 KB

I did manual testing and it works! One note: the view linked above in comment #1 didn't work for me because it requires a relationship to a Taxonomy Vocabulary that I don't have. I've attached a new exported view that works for me.

Coding standards look good in both Coder and a quick read through. Quick security audit looks good - no HTML is generated anywhere (it's all done by standard views handlers from the views module).

I have a couple minor notes about the API documentation in comments:

However, minor nitpicks like those aren't enough to prevent an RTBC.

Great work!

kerasai’s picture

Comments in source corrected per #11.

kerasai’s picture

Issue tags: +PAreview: review bonus

Adding PAReview: review bonus tag, with reviews listed in issue summary.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

manual review:

But that is not an application blocker, so ...

Thanks for your contribution, kerasai!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

dsnopek’s picture

Huzzah! Congrats, @kerasai! :-)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added review bonus