<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Penguinspeak &#187; Flickr API</title>
	<atom:link href="http://macmartine.com/blog/category/flickr-api/feed" rel="self" type="application/rss+xml" />
	<link>http://macmartine.com/blog</link>
	<description>This is how I see it.</description>
	<lastBuildDate>Tue, 19 Oct 2010 00:39:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Creating authenticated/signed Flickr API calls in Flex/Actionscript</title>
		<link>http://macmartine.com/blog/2008/01/creating_authenticatedsigned_f.html</link>
		<comments>http://macmartine.com/blog/2008/01/creating_authenticatedsigned_f.html#comments</comments>
		<pubDate>Mon, 14 Jan 2008 19:32:26 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flickr API]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=20</guid>
		<description><![CDATA[Since the individual doc pages for the Flickr API calls don&#8217;t tell you how to create a signed API call, it took me a minute to figure it out. This info can be found in the Flickr User Authentication docs, but here&#8217;s how to create a signed call. Let&#8217;s say you want to call flickr.people.getUploadStatus. [...]]]></description>
			<content:encoded><![CDATA[<p>Since the individual doc pages for the Flickr API calls don&#8217;t tell you how to create a signed API call, it took me a minute to figure it out. This info can be found in the <a href="http://www.flickr.com/services/api/misc.userauth.html">Flickr User Authentication docs</a>, but here&#8217;s how to create a signed call.<br />
Let&#8217;s say you want to call flickr.people.getUploadStatus.<br />
Well, the call requires authentication or else it won&#8217;t do you any good. Once you are authenticated you create the call by performing the following steps:<br />
1) Create a string using the required parameter names plus their values in alphabetical order (i.e. &#8220;api_key&#8221; + api_key_value .) Then preceed this string with the shared_secret, and append the string with the string &#8220;method&#8221; plus the method name. Note that every authenticated call requires both the auth_token and api_sig arguments.<br />
So, in the case of flickr.people.getUploadStatus the string would look something like:</p>
<pre name="code" class="java">
var api_sig : String = shared_secret + "api_key" + api_key_value+ "auth_token" + token_value + "method" + "flickr.people.getUploadStatus"
</pre>
<p>2) Then get the MD5() of this string. As I mention in another post, I use <a href="http://gsolofp.blogspot.com/2006/01/actionscript-3-md5-and-sha1.html">this</a> class, and simply call  MD5.encrypt( myString )</p>
<pre name="code" class="java">
var api_sig_encrypted : String = MD5.encrypt( api_sig );
</pre>
<p>3) We can then make the call:</p>
<pre name="code" class="java">
var params : Object = { "method": "flickr.people.getUploadStatus", "api_key": api_key, "api_sig" : api_sig_encrypted, "auth_token" : auth_token };
codeService.request = params;
codeService.url 	= "http://api.flickr.com/services/rest/";
codeService.addEventListener( ResultEvent.RESULT, getUploadStatusResult );
codeService.addEventListener( FaultEvent.FAULT, faultResult );
codeService.send();
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Creating+authenticated%2Fsigned+Flickr+API+calls+in+Flex%2FActionscript+http%3A%2F%2Fbit.ly%2F276pNU" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2008/01/creating_authenticatedsigned_f.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MD5 for Actionscript</title>
		<link>http://macmartine.com/blog/2008/01/md5_for_actionscript_1.html</link>
		<comments>http://macmartine.com/blog/2008/01/md5_for_actionscript_1.html#comments</comments>
		<pubDate>Mon, 14 Jan 2008 19:25:15 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flickr API]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=19</guid>
		<description><![CDATA[I&#8217;m working on a Flex/AIR application that requires Flickr authentication so I needed an MD5 class for Actionscript. Here&#8217;s the one i&#8217;ve been using and it&#8217;s been working great. It&#8217;s simple and doesn&#8217;t have a load of extra unnecessary baggage.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a Flex/AIR application that  requires Flickr authentication so I needed an MD5 class for Actionscript. <a href="http://gsolofp.blogspot.com/2006/01/actionscript-3-md5-and-sha1.html">Here&#8217;s</a> the one i&#8217;ve been using and it&#8217;s been working great. It&#8217;s simple and doesn&#8217;t have a load of extra unnecessary baggage.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=MD5+for+Actionscript+http%3A%2F%2Fbit.ly%2F32AZTh" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2008/01/md5_for_actionscript_1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

