<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>WebDH blog - Twitter</title>
			<link>http://blog.webdh.com/index.cfm</link>
			<description>This is Troy&apos;s blog for WebDH.com LLC.</description>
			<language>en-us</language>
			<pubDate>Mon, 06 Sep 2010 12:49:44 -0700</pubDate>
			<lastBuildDate>Wed, 04 Feb 2009 15:35:00 -0700</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>webdh.com@gmail.com</managingEditor>
			<webMaster>webdh.com@gmail.com</webMaster>
			
			<item>
				<title>Update your Twitter status from ColdFusion using a JSP tag library</title>
				<link>http://blog.webdh.com/index.cfm/2009/2/4/Update-your-Twitter-status-from-ColdFusion-using-a-JSP-tag-library</link>
				<description>
				
				Today I wanted to find an easy way to put a status update into my Twitter account using ColdFusion. I went searching the API docs, and found this page.

&lt;a href=&quot;http://apiwiki.twitter.com/Libraries&quot; target=&quot;_blank&quot;&gt;http://apiwiki.twitter.com/Libraries&lt;/a&gt;

Unfortunately, there are no CF examples listed, boo! However, there are some for Java, so I continued my search in that direction. Eventually I found this JSP taglib, and decided to give it a &quot;Twirl&quot; :)

&lt;a href=&quot;http://www.servletsuite.com/servlets/twittertag.htm&quot; target=&quot;_blank&quot;&gt;http://www.servletsuite.com/servlets/twittertag.htm&lt;/a&gt;

To use any JSP taglib, you simply drop the .jar file into your /webroot/WEB-INF/lib/ directory. I believe it also requires the Enterprise edition of ColdFusion. A &lt;a href=&quot;http://coldfusion.sys-con.com/node/41747&quot; target=&quot;_blank&quot;&gt;good article&lt;/a&gt; that fully explains their usage was done by Charlie Arehart back in May 2002.

After copying the file, you must then restart ColdFusion. This is a must or you will get an error when attempting to import the library. 

That&apos;s it, I was now ready to test a Twitter post. Here is the sample code I used that will put a new status message in my Twitter account. I saved this in a file twitter.cfm, then browsed to the page on my local machine as http://localhost/twitter.cfm 
&lt;code&gt;
&lt;cfimport taglib=&quot;/WEB-INF/lib/twittertag.jar&quot; prefix=&quot;twitter&quot;&gt; 
&lt;twitter:update user=&quot;your_username_here&quot; password=&quot;your_password_here&quot; id=&quot;result&quot;&gt;
My posting to Twitter from CF &lt;cfoutput&gt;#now()#&lt;/cfoutput&gt; 
&lt;/twitter:update&gt; 
&lt;/code&gt;

Upon success, an XML dataset is returned in the &quot;result&quot; variable. If you cfdump it, looks like this.
&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;status&gt; &lt;created_at&gt;Wed Feb 04 21:29:26 +0000 2009&lt;/created_at&gt; &lt;id&gt;1177644114&lt;/id&gt; &lt;text&gt;My posting to Twitter from CF {ts &apos;2009-02-04 15:29:28&apos;}&lt;/text&gt; &lt;source&gt;web&lt;/source&gt; &lt;truncated&gt;false&lt;/truncated&gt; &lt;in_reply_to_status_id&gt;&lt;/in_reply_to_status_id&gt; &lt;in_reply_to_user_id&gt;&lt;/in_reply_to_user_id&gt; &lt;favorited&gt;false&lt;/favorited&gt; &lt;in_reply_to_screen_name&gt;&lt;/in_reply_to_screen_name&gt; &lt;user&gt; &lt;id&gt;20062919&lt;/id&gt; &lt;name&gt;Twin Cities CFUG&lt;/name&gt; &lt;screen_name&gt;TCCFUG&lt;/screen_name&gt; &lt;location&gt;St. Paul, MN USA&lt;/location&gt; &lt;description&gt;Adobe ColdFusion User Group -of Minneapolis / St. Paul, Minnesota&lt;/description&gt; &lt;profile_image_url&gt;http://s3.amazonaws.com/twitter_production/profile_images/75391930/colderfusion_twitter_normal.jpg&lt;/profile_image_url&gt; &lt;url&gt;http://groups.adobe.com/groups/bd9082a926/&lt;/url&gt; &lt;protected&gt;false&lt;/protected&gt; &lt;followers_count&gt;0&lt;/followers_count&gt; &lt;/user&gt; &lt;/status&gt;
&lt;/code&gt;

If you fail to restart CF, you will see this TagExtraInfo error message:
&lt;code&gt;
The TagExtraInfo class com.cj.twitter.strVariable for the update tag could not be found.

The CFML compiler was processing:
    * A cfimport tag beginning on line 1, column 2.
&lt;/code&gt;

This is not the best solution if you are in a shared hosting environment, as they may not install the twittertag.jar file for you. I&apos;m curious what other methods developers have found to accomplish status posts to Twitter. 
				</description>
				
				<category>Twitter</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Wed, 04 Feb 2009 15:35:00 -0700</pubDate>
				<guid>http://blog.webdh.com/index.cfm/2009/2/4/Update-your-Twitter-status-from-ColdFusion-using-a-JSP-tag-library</guid>
				
			</item>
			</channel></rss>