The Twitter4J Plugin

It seems that everyone is on Twitter[70] these days—even if they can’t tell you why. We’ll take advantage of this fact to help our hardworking event organizers get the word out about their events. If an event’s organizer creates a Twitter account for their event, we will provide a form on the dashboard that will enable them to post updates to their event’s Twitter timeline. To do this, we’ll use the Twitter4J plugin mentioned earlier.

The Twitter4J plugin gives us easy access to the Twitter4J library.[71] In TekDays/grails-app/conf/BuildConfig.groovy, add the following dependency:

 
compile ":twitter4j:0.3.2"

This plugin provides a service class (Twitter4jService) that gives us access to the Twitter4J API,[72] which has ...

Get Grails 2: A Quick-Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.