<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Dragonfly RIA Blog</title>
			<link>http://www.dragonflybytes.com/blogger/index.cfm</link>
			<description>Dragonfly RIA Blog</description>
			<language>en-us</language>
			<pubDate>Wed, 08 Sep 2010 03:39:26 -0700</pubDate>
			<lastBuildDate>Sun, 15 Jul 2007 10:02:00 -0700</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>cory@dragonflybytes.com</managingEditor>
			<webMaster>cory@dragonflybytes.com</webMaster>
			
			
			
			
			
			<item>
				<title>Updating Facebook Profile FBML using setRefHandle, fb:ref  and &quot;infinate sessions&quot;.</title>
				<link>http://www.dragonflybytes.com/blogger/index.cfm/2007/7/15/Updating-Facebook-Profile-FBML-using-setRefHandle-and-infinate-sessions</link>
				<description>
				
				Setting up an infinate session in CF is not difficult.

You need to echo the request.session_info.session_key to the screen and save it (somewhere). You also need a user id. 

I have a scheduled task that triggers a file every hour, on the hour. 

I like the setRefHandle because it allows me to update a cache on the facebook server instead of pulling or pushing content whenever there is an update. Even if the handle is the userID, the functionality is great!

In this examle, the handle name I have chosen is called &quot;global_message&quot; and the content is the date and time when the script was last accessed. 

&lt;code&gt;
&lt;cfscript&gt;
facebook 	= CreateObject(&quot;component&quot;,&quot;FacebookRestClient&quot;).init(argumentCollection=request.config);
request.key 			= &quot;[saved session ID]&quot;;
request.uid 			= &quot;[userID]&quot;;
&lt;/cfscript&gt;
&lt;cfoutput&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;InvalidTag http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;cfscript&gt;
		res = facebook.fbml_setRefHandle(&quot;global_message&quot;, &quot;#DateFormat(Now())# #TimeFormat(Now())#&quot;, request.key);
&lt;/cfscript&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;/cfoutput&gt;

&lt;/code&gt;


The function to add to the facebook CFC is this:
&lt;code&gt;
&lt;!---
Created by Cory Johnson on June 13, 2007

For help with this, contact cory@dragonflybytes.com
---&gt;
&lt;!--- cache controls ---&gt;
	&lt;cffunction name=&quot;fbml_setRefHandle&quot; access=&quot;public&quot; output=&quot;false&quot; returntype=&quot;any&quot;&gt;
		&lt;cfargument name=&quot;app_handle&quot; type=&quot;string&quot; required=&quot;yes&quot; /&gt;
		&lt;cfargument name=&quot;fbml&quot; type=&quot;string&quot; required=&quot;yes&quot; /&gt;	
		&lt;cfargument name=&quot;sess_key&quot; type=&quot;string&quot; required=&quot;yes&quot; /&gt;		
		&lt;cfset var result = &quot;&quot; /&gt;
		&lt;cfset var params = StructNew() /&gt;
		&lt;cfset params[&quot;handle&quot;] = arguments.app_handle/&gt;
		&lt;cfset params[&quot;fbml&quot;] = arguments.fbml/&gt;
		&lt;cfset params[&quot;session_key&quot;] = arguments.sess_key/&gt;
		
		&lt;cfset result = callMethod(&quot;facebook.fbml.setRefHandle&quot;, params) /&gt;

		&lt;cfreturn result /&gt;
	&lt;/cffunction&gt;
&lt;/code&gt;


In my facebook application, I have set the default FBML to this&quot;

&lt;code&gt;
&lt;fb:ref handle=&quot;global_message&quot; /&gt;
&lt;/code&gt;
				
				</description>
						
				
				<category>facebook</category>				
				
				<pubDate>Sun, 15 Jul 2007 10:02:00 -0700</pubDate>
				<guid>http://www.dragonflybytes.com/blogger/index.cfm/2007/7/15/Updating-Facebook-Profile-FBML-using-setRefHandle-and-infinate-sessions</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Coldfusion Facebook REST API Example.</title>
				<link>http://www.dragonflybytes.com/blogger/index.cfm/2007/6/13/Coldfusion-Facebook-REST-API-Example</link>
				<description>
				
				I&apos;ve created a quick and very, very dirty example on how to create a Coldfusion application for Facebook. There is no documentation with the project, and it comes as is where is blah blah blah, no warranty, etc. Use at your own risk. 

In your facebook application, set it to use an Iframe. I have not yet figured out how to pass the auth_token through a complete FBML application.

There is a REST compatible CFC &lt;a href=&quot;http://www.nearpersonal.com/code/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;

You&apos;ll need to add these two functions somewhere to your pleasing in the CFC.


&lt;code&gt;

&lt;!---
   Created by Cory Johnson on June 13, 2007

   For help with this, contact cory@dragonflybytes.com
---&gt;

	&lt;!--- fbml ---&gt;
	&lt;cffunction name=&quot;fbml_setFBML&quot; access=&quot;public&quot; output=&quot;false&quot; returntype=&quot;any&quot;&gt;
		&lt;cfargument name=&quot;fbml&quot; type=&quot;string&quot; required=&quot;yes&quot; /&gt;
		&lt;cfargument name=&quot;sess_key&quot; type=&quot;string&quot; required=&quot;yes&quot; /&gt;

		&lt;cfset var result = &quot;&quot; /&gt;
		&lt;cfset var params = StructNew() /&gt;

		&lt;cfset params[&quot;markup&quot;] = arguments.fbml/&gt;
		&lt;cfset params[&quot;session_key&quot;] = arguments.sess_key/&gt;		

		&lt;cfset result = callMethod(&quot;facebook.profile.setFBML&quot;, params) /&gt;

		&lt;cfreturn result /&gt;
	&lt;/cffunction&gt;

	&lt;cffunction name=&quot;fbml_getFBML&quot; access=&quot;public&quot; output=&quot;false&quot; returntype=&quot;any&quot;&gt;
		&lt;cfargument name=&quot;sess_key&quot; type=&quot;string&quot; required=&quot;yes&quot; /&gt;
		&lt;cfargument name=&quot;uid&quot; type=&quot;string&quot; required=&quot;yes&quot; /&gt;

		&lt;cfset var result = &quot;&quot; /&gt;
		&lt;cfset var params = StructNew() /&gt;
		
		&lt;cfset params[&quot;uid&quot;] = arguments.uid /&gt;
		&lt;cfset params[&quot;session_key&quot;] = arguments.sess_key /&gt;
		
		&lt;cfset result = callMethod(&quot;facebook.profile.getFBML&quot;, params) /&gt;

		&lt;cfreturn result /&gt;
	&lt;/cffunction&gt;
&lt;/code&gt;

A small difference between these methods, and those in the REST Client, is that I am not using the XmlToArray function. I prefer Xpath, because it&apos;s more like working with an Object. You can change that if you really want to. 

The source I made to go with this source is &lt;a href=&quot;http://www.dragonflybytes.com/blog_example_code/cf_facebook_api_example.zip&quot; target=&quot;_top&quot;&gt;here&lt;/a&gt;
				
				</description>
						
				
				<category>facebook</category>				
				
				<pubDate>Wed, 13 Jun 2007 22:09:00 -0700</pubDate>
				<guid>http://www.dragonflybytes.com/blogger/index.cfm/2007/6/13/Coldfusion-Facebook-REST-API-Example</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Apollo, Apollo.</title>
				<link>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/27/Apollo-Apollo</link>
				<description>
				
				&lt;A href=&quot;http://www.adobe.com/go/apollo&quot; target=&quot;_blank&quot;&gt; Why not get the runtime &amp; flex builder 2 extentions&lt;/a&gt; (if you have Flex Builder 2)
				
				</description>
						
				
				<category>apollo</category>				
				
				<pubDate>Tue, 27 Mar 2007 19:14:00 -0700</pubDate>
				<guid>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/27/Apollo-Apollo</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Flex Form Validation for Rich Forms</title>
				<link>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/25/Flex-Form-Validation-for-Rich-Forms</link>
				<description>
				
				Adding validators to a rich form is reasonably simple. For Cold Fusion 7.02, the flex and mxml API referrence you need to use is &lt;a href=&quot;http://livedocs.adobe.com/flex/15/asdocs_en/index.html&quot; target=&quot;blank&quot;&gt;here&lt;/a&gt;

&lt;more&gt;Show me the goods...
				 [More]
				</description>
						
				
				<category>flex</category>				
				
				<pubDate>Sun, 25 Mar 2007 13:29:00 -0700</pubDate>
				<guid>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/25/Flex-Form-Validation-for-Rich-Forms</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Recursion, XML, and Flash Remoting for CFTree Components (Part 2)</title>
				<link>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/25/Recursion-XML-and-Flash-Remoting-for-CFTree-Components-Part-2</link>
				<description>
				
				In the previous entry, I showed how to make an XML document with a recursive function in a CFC. In this example, I show how to use the CFTree Form element of a CFForm to present the data as a Tree.

&lt;more&gt;Behind the scenes
				 [More]
				</description>
						
				
				<category>flash remoting</category>				
				
				<pubDate>Sun, 25 Mar 2007 09:26:00 -0700</pubDate>
				<guid>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/25/Recursion-XML-and-Flash-Remoting-for-CFTree-Components-Part-2</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Recursion, XML, and Flash Remoting for CFTree Components (Part 1)</title>
				<link>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/22/Recursion-and-XML</link>
				<description>
				
				In this entry, I explain how to construct a simple XML document for use with a flash CFForm Tree component. It is particularly useful where a field referrences a primary key in the same table. You may need to change it around to suit your needs.

&lt;more&gt;Read on, Adventurer....
				 [More]
				</description>
						
				
				<category>flash remoting</category>				
				
				<pubDate>Thu, 22 Mar 2007 18:40:00 -0700</pubDate>
				<guid>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/22/Recursion-and-XML</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Free Apollo Book</title>
				<link>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/17/Free-Apollo-Book</link>
				<description>
				
				&lt;img src=&quot;http://www.dragonflybytes.net/blogger/images/book.jpg&quot; alt=&quot;&quot; width=&quot;145&quot; height=&quot;240&quot; align=&quot;top&quot; /&gt;
&lt;a href=&quot;http://labs.adobe.com/wiki/index.php/Apollo:Books:Apollo_for_Adobe_Flex_Developers_Pocket_Guide&quot;&gt;Free Books On Adobe Labs!&lt;/a&gt;
				
				</description>
						
				
				<category>apollo</category>				
				
				<pubDate>Sat, 17 Mar 2007 13:52:00 -0700</pubDate>
				<guid>http://www.dragonflybytes.com/blogger/index.cfm/2007/3/17/Free-Apollo-Book</guid>
				
			</item>
			
		 	
			</channel></rss>