TwitNotes – Twitter sidebar plugin for Notes 8

Please note that TwitNotes v1 has been discontinued as Twitter has changed their API and the client will no longer work. You should instead be installing TwitNotes v2 which is vastly superior. You may find that plugin at the TwitNotes v2 page at lekkimworld.com/twitnotes2.

About the plugin

This is the home of the TwitNotes plugin for IBM Lotus Notes 8.x client. The plugin is a client for the Twitter network and lets you read Twitter status messages from the people you follow and search Twitter directly in your Notes sidebar. The plugin also lets you update your status, send public replies and send direct messages to users you follow.

The plugin is written as a sidebar plugin for the Lotus Notes 8 client / Lotus Expeditor but could with minor changes run fine in plain ol’ Eclipse. If you have questions or comments about the plugin please let me know by commenting on the blog or by sending me an e-mail (see the about me page).

The plugin is currently in version 1.0.13. See the “Screenshots”-section for screenshots of the plugin and the “Version history”-section for changes in the different versions.

Easy to install!

The easiest way to install is to drag the widget descriptor to the MyWidgets sidebar panel in Notes.

If you do not see the MyWidgets panel open the Notes preferences dialog, click the “Widgets”-section on the left and check the “Show Widget Toolbar and the My Widgets Sidebar panel” checkbox. If you cannot do this you should call your friendly administrator and tell him/her that it’s vital for your web 2.0 experience that you’re allowed to do this… 🙂

Table of contents

Screenshots

TwitNotes 1.0.9 on Windows Vista Notes 8.5 GOLD. 

Searching twitter.com using TwitNotes 1.0.9 on Windows Vista Notes 8.5 GOLD. 

TwitNotes 1.0.9 on Ubuntu 8.0.4 using Notes 8.5 GOLD. 

Installing

Note: Vaughan Rivett has posted a comprehensive video on how to install TwitNotes.

Note: Vowe has posted info on how to install TwitNotes on Mac. Read the post here.

The plugin can be installed using either the update site (see more below) or take the easy route and use the MyWidget panel in Notes 8.0.1 and newer. To use the MyWidget approach simply drag the widget descriptor to the MyWidget panel to install.

Advanced users

You can also install using an update site. An update site is a place on the internet where your Notes client can load the necessary files from so you don’t have to download and install manually. All you need to do is tell your Notes client where the update site is located and you’re good to go. Below I’ll describe how to create such an update site.

There are two ways of creating an update site in Notes; 1) create the update site from scratch or import the update site definition from a file on the internet that I provider. It’s the one or the other. I’ll describe both approaches below but if you’re new to the concept of an update sites I suggest to follow the first set of instructions (import).

Import the update site definition

  1. Open the install dialog (File/Application/Install). If you haven’t got the menu item see under “plugin_customization.ini” in the “Troubleshooting”-section below before continuing..
  2. Choose “Search for new features to install” and click Next.
  3. Click the “Import location…” button (see screenshot below)
  4. Now paste the URL to import from (http://update.lekkimworld.com/attentionotes/updatesite.xml) into the file name field and click Open (see screenshot below).
  5. Now make sure there’s a checkmark next to the “AttentioNotes Update Site” and click the “Finish”-button.
  6. Note: If you get a “provisioning failed” error dialog you didn’t follow the above steps and I suggest you redo the above steps.
  7. Set a checkmark next to the “AttentioNotes Update Site” and click Next.
  8. Accept the license agreement and click Next.
  9. Click Finish.
  10. Select “Install this plug-in” and click OK.
  11. Select “Install this plug-in” and click OK.
  12. Say “yes” to restart Notes 8.

Now the plugin should be installed. For information on how to configure your Twitter credentials and on how to configure the plugin see the “Configuration” section below.

Create the update site yourself

To create an update site manually you only need the URL to the update site so here it is: http://update.lekkimworld.com/attentionotes/

When installing you’ll see two features – you need them both (if you want know why then check out the “Technical description” section). When the plugin is installed you should configure your Twitter credentials – see the “Configuration” section for that information.

Upgrading

If already got the plugin installed you may easily upgrade to the latest version. To update follow the below steps:

  1. Select File/Application/Install from the menu
  2. Select “Search for updates of the currently installed features” and click “Next”.
  3. Make sure the TwitNotes/AttentioNotes update site is checked and click “Finish”.
  4. Follow the directions on screen (almost like installing in the first place).
  5. Restart Notes.

Configuration

The login credentials for Twitter is read using the Accounts API in Lotus Expeditor. To create the account follow the steps below – see the end of the section for a screenshot of how an account should look when completed.

      1. Open the preferences (File/Preferences).
      2. Select “Accounts” at the top.
      3. Click “New account”

    and enter the following information (click

here

     for screenshot):

    1. Specify “TwitNotes” for the account name.
    2. Choose HTTP for the type.
    3. Specify “http://twitter.com” for the server.
    4. Specify your Twitter login name for the “Name”.
    5. Specify your Twitter password name for the “Password”.
    6. Click “OK”.
  1. Click OK.

Preferences

Refresh interval etc. is set in the preferences dialog which you can access from the viewpart menu of the plugin or via the preferences for Notes 8 (File/Preferences) under “TwitNotes”.

Future plans

  • Find other Twitter user – maybe by being mentioned by others
  • Follow user
  • Wire to property broker for use in composite applications
  • Other data providers / submit area providers
  • Submit to multiple/different Twitter accounts
  • Sametime awareness

Technical description

The TwitNotes plugin is actually based on a general purpose plugin called AttentioNotes. AttentioNotes accepts contributions for how to obtain data (or posts) via so called “data providers” and contributions on how to submit information via so called “submit area providers”. The TwitNotes plugin is the AttentioNotes plugin with a Twitter data provider and a Twitter submit area provider. Actually you can, and you’re more than welcome, to install other data providers and/or submit area providers. You could also write these yourself as explained below. Although you can provide a submit area provider for a “system” without supplying a data provider it doesn’t make such sense.

As such the AttentioNotes plugin demonstrates the extensibility of the Notes 8 platform by being extensible itself.

The AttentioNotes plugin can also be used in a composite application and you can set component properties to control how the UI is rendered. See below for which component properties are available.

Component properties

AttentioNotes allows the below component properties to be set.

com.lekkimworld.attentionotes.hideSubmit

If set to “true” the submit area will be hidden no matter how many submit area providers are present.

com.lekkimworld.attentionotes.hideRefreshTime

If set to “true” the refresh time (shown above the table of posts) will be hidden from the UI.

Extension points

AttentioNotes has the below extension points which are available for public consumption and contribution.

com.lekkimworld.attentionotes.dataProvider

Use this extension point to contribute a data provider to the sidebar plugin. As mentioned above AttentioNotes is at its core a sidebar plug-in for showing “posts” from a variety of sources. Twitter is just an example of a data source and the AttentioNotes Twitter Feature supplies a data provider for Twitter (using the JSON API).

A data provider is a class that implements the com.lekkimworld.attentionotes.provider.data.IDataProvider interface and it is used to supply a java.util.List of com.lekkimworld.attentionotes.model.Post objects based on various arguments as specified in the interface.

See the interface and the extension point for more information.

com.lekkimworld.attentionotes.submitAreaProvider

The area above the table a posts is called the submit area. You can contribute providers for this area. If there are no contributions for this area it is hidden. If there’s one provider the provider is shown and it there’s more than one provider a tabbed table is shown with a tab per provider (see screenshot).

A submit area provider is provided with a parent Composite and is free to set whatever Layout it needs/wants and create the UI approprite for the provider. The UI should be limited to a height of 100 pixels since this is the height imposed on the parent Composite when multiple providers are present.

A submit area provider should implement the com.lekkimworld.attentionotes.provider.submitarea.ISubmitAreaProvider interface. The init() method of this interface will supply a com.lekkimworld.attentionotes.provider.submitarea.ISubmitNotifier to allow the contributing plugin to inform the AttentioNotes plugin when data is submitted. The AttentioNotes plugin uses this to auto refresh the data from data providers after a submit (if applicable as set in the preferences). Submit area providers should call back on this class when submitting.

See the interface and the extension point for more information.

com.lekkimworld.attentionotes.rendere

A rendere is used by render text in the main UI table. I rendere is a Java class that implements the com.lekkimworld.attentionotes.provider.rendere.IRendere interface. The AttentioNotes plugin comes with two renderes; one for simple string data and one for HTTP links. The string rendere is the fallback if the data to be rendered doesn’t match any other rendere. The HTTP rendere is used to make HTTP(S), FTP and Notes URL’s clickable.

You may provide your own rendere if you so choose. This is the mechanism used by the Twitter plugin to make Twitter author links (i.e. @lekkim) clickable.

See the interface and the extension point for more information.

Troubleshooting

plugin_customization.ini

If you can’t see the File/Application/Install menu item do the following:

  1. Close Notes.
  2. Open a file explorer.
  3. Locate your binary Notes 8 directory.
  4. Open the framework/rcp directory.
  5. Edit the plugin_customization.ini file and add the following line: com.ibm.notes.branding/enable.update.ui=true
  6. Save and close the file.
  7. Start Notes and try installing again.

Note: Provisioning of plugins to your client may be prohibited by your administrator via a Desktop policy. If you do the plugin_customization.ini trick and the menu item doesn’t show up drop your administrator an e-mail. If you’re the administrator – well that’s what explicit policies are for! 🙂

Manual uninstall

If the uninstall using “File/Application/Application Management” doesn’t work you can remove the plugin manually by following the below directions (please note that the exact version numbers of the plugin/features may differ based on the version you’re uninstalling):

  1. Close Notes
  2. Find your Notes data directory (see below if you’re on a Mac)
  3. Open the workspace/applications/eclipse directory
  4. In the features directory delete the com.lekkimworld.feature.attentionotes.core and com.lekkimworld.feature.attentionotes.twitter files
  5. In the plugins directory delete the org.joda.time_1.5.2, org.apache.commons.lang_2.3.0, org.apache.commons.httpclient_3.1.0, net.unto.twitter_0.0.1, net.sourceforge.jsonlib_2.2.1 and net.sourceforge.ezmorph_1.0.4 files
  6. Start Notes

That should do it.

P.S.: Some users have experienced problems when manually uninstalling plugins. You might have to launch Notes with the -clean switch.

If you’re on a Mac the plugin/feature directory may be a little hard to find so I have added some help below.

  1. Right-click on the Notes applicatio icon
  2. Select “Show package contents”
  3. Navigate to Contents/MacOS/shared/eclipse. This directory holds the plugins and features directories.

Version history

Version Date Description
1.0.13 15 December 2009
  • Added retweet support by dragging tweet from the list to the input field
  • Allow drag’n’drop of text to the input field to easily tweet
  • Allow drag’n’drop of text from the input field to any other site accepting text drop
  • Detection of #hashtags in tweets
  • Allow you to click a #hashtag to search for it on the “Twitter Search”-tab
  • Changed behavior when clicking an author name – now a search is performed on the “Twitter Search”-tab instead of filtering the list
  • All operations are now done using SSL
1.0.12 10 December 2009
  • Now works on Notes 8.5.1
1.0.11 N/A
  • Internal release…
1.0.10 22 April 2009
  • Fix issue with no tweets being displayed due to problem handling utc_offset in Twitter JSON API
1.0.9 11 March 2009
  • Make sure the date/time of the post is represented in search results
  • Make sure the source application of the post is represented in search results
  • Make sure the Twitter tab is always the first tab and search is the second
  • Make sure TwitNotes is working perfectly on Ubuntu
  • Fix the version number in the about dialog
1.0.8 10 March 2009 Never really released publicly but fixes wordwrap on Ubuntu.
1.0.7 10 March 2009
  • Easier searching by responding to pressing the Enter key on the Search tab
  • Make sure all profile images are scaled to 48x48px to handle too large images (looking at you @marybethraven)
  • Attempt to fix wordwrap issue on Ubuntu – still working on that
1.0.6 12 December 2008 Match twitter.com API changes for credentials.
1.0.5 31 July 2008 Added Twitter search capabilities.
1.0.4 10 Apr 2008 Bug fixes.
1.0.3 4 Apr 2008 Additions

  • The message author name is now clickable to allow you to filter the list to this author
  • Twitter names in messages (e.g. @lekkim) are now recognized and clickable to filter the list of messages to messages by that user
  • Twitter names are right-clickable so you can
    • Start a new reply message to that user (start a new message with @)
    • Start a new direct message to that user
    • Copy the name to the clipboard
  • URL links in messages are now clickable and will open in the default browser
  • URL links are right-clickable and can be copied to the clipboard
  • Hover text shown when hovering over clickable link
  • Added action in part menu to go with the above to reset the author filter
  • Renamed “Refresh data” action in the part menu to “Update”
  • URL’s sent through TwitNotes are automatically converted to TinyUrls using tinyurl.com
  • Right-click option to copy entire message to clipboard
  • Added direct message support to followers by adding “Direct!” button and drop-down with follow names
  • Added API for thirdparty contributions to detect clickable links and associated actions

Fixes/changes

  • Author images where image name has funky characters are fetched successfully
  • Submit area providers are now encapsulated in their own Composite to avoid their layout to affect the greater plugin layout
  • Tweet! button moved due to support for direct messages
1.0.2 27 Mar 2008
  • Fixed line height issue after manually handling text wrap due to text wrap issue on Windows XP
  • TwitNotes registered as an ‘official’ Twitter application
  • Source application id set so posts will show up as coming ‘from TwitNotes’ in Twitter clients
  • Small fixes to label provider (no more “1 hours”)
  • Added action to clear the author cache at runtime
1.0.1 26 Mar 2008
  • Fixed text wrap issue on Windows XP
  • Fixed disappearing image when selecting a table row on Windows XP
  • Fixed missing unescaping of XML entities
1.0.0 25 Mar 2007 Initial release