Difference between revisions of "Twitter App ShortenURL Function"

From ADF Docs
Jump to: navigation, search
(Created page with '== Overview == The papertweetService component contains a few functions you can take advantage off in your custom scritps. One of these functions is the shortenURL function. ==…')
 
m
 
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
The papertweetService component contains a few functions you can take advantage off in your custom scritps. One of these functions is the shortenURL function.  
+
The twitterService component contains a few functions you can take advantage off in your custom scritps. One of these functions is the shortenURL function.  
  
 
== Setup ==
 
== Setup ==
Line 11: Line 11:
 
<source lang="java">
 
<source lang="java">
 
<cfoutput>
 
<cfoutput>
#application.papertweet.twitterService.shortenURL('http://something.com/some/long/url.html')#
+
#application.twitter.twitterService.shortenURL('http://something.com/some/long/url.html')#
 
</cfoutput>
 
</cfoutput>
 
</source>
 
</source>

Latest revision as of 19:34, 16 August 2010

Overview

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

Setup

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

Demo

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:
<cfoutput>
#application.twitter.twitterService.shortenURL('http://something.com/some/long/url.html')#
</cfoutput>
  • 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.
  • On the page you'll see the shortened URL, something like this:
http://bit.ly/abcdefg1234