Twitter App AddHovercards Function

From ADF Docs
Revision as of 19:33, 16 August 2010 by Cmora (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The twitterService component contains a few functions you can take advantage off in your custom scritps. One of these functions is the addHovercards function.


1. It is installed as part of the Twitter application's installation.


To set up a demo of the Follow Button custom element, follow these steps:

  • Create a new CFM file inside one of your subsite's customcf folder.
  • In this file add the following code:
<div id="hovercards">
    Hover the mouse over my Twitter screen name @cvmora and the hovercard will pop up over it.
    The hovercards show the twitter pic and a button that allows you to follow me,
    or @commonspot.

  • Note the ##hovercards argument sent into the function:
    • If specified, it limits the scraping to the region identified by the CSS selector passed in. It can be a Class (.selectorName) or an ID (##selectorName).
    • If left blank the hovercard function scrapes the whole page for twitter usernames.
  • Create a new page and place a Custom Script element on the page.
  • Click the 'Edit' button.
  • Select or type in the path to your new custom script.
  • Submit the changes to the page.