<?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>Capture the Conversation &#187; iPad</title>
	<atom:link href="http://www.capturetheconversation.com/tag/ipad/feed" rel="self" type="application/rss+xml" />
	<link>http://www.capturetheconversation.com</link>
	<description>Social Media Conversation</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:40:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sharing Your Social Devices</title>
		<link>http://www.capturetheconversation.com/fun/sharing-your-social-devices</link>
		<comments>http://www.capturetheconversation.com/fun/sharing-your-social-devices#comments</comments>
		<pubDate>Tue, 16 Nov 2010 00:31:14 +0000</pubDate>
		<dc:creator>Room214</dc:creator>
				<category><![CDATA[Fun Stuff]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[TV]]></category>
		<category><![CDATA[tv viewing habits]]></category>

		<guid isPermaLink="false">http://www.capturetheconversation.com/?p=1753</guid>
		<description><![CDATA[While apps and websites may connect us socially, we rarely make the devices themselves a social experience. My phone is a very personal tool. It holds my emails, access to my Twitter and Facebook accounts (which, for me, have some business purpose), contact information for hundreds of people, and really neat pictures from Hipstamatic. While I don&#8217;t mind people making phone calls, I&#8217;d never be willing to share it. The same goes for my computer.
An iPad is a different story. I remember reading a post by Fred Wilson, who was revisiting his negative opinion on his iPad. He noted that the &#8220;iPad makes using a computer less of a commitment&#8221; and goes on to explain how, in addition to easily moving in and out of interaction with the device, his whole family share use together, as well as each having their own personal use. Some data from Nielsen supports his...]]></description>
			<content:encoded><![CDATA[<p>While apps and websites may connect us socially, we rarely make the devices themselves a <a href="http://www.capturetheconversation.com/mobile/are-you-reading-this-post-on-a-mobile-device" target="_self">social experience</a>. My phone is a very personal tool. It holds my emails, access to my Twitter and Facebook accounts (which, for me, have some business purpose), contact information for hundreds of people, and really neat pictures from Hipstamatic. While I don&#8217;t mind people making phone calls, I&#8217;d never be willing to share it. The same goes for my computer.</p>
<p>An iPad is a different story. I remember reading a post by Fred Wilson, who was revisiting his negative opinion on his iPad. He noted that the &#8220;iPad makes using a computer <a href="http://www.avc.com/a_vc/2010/05/ive-changed-my-mind-about-the-ipad.html" target="_blank">less of a commitment</a>&#8221; and goes on to explain how, in addition to easily moving in and out of interaction with the device, his whole family share use together, as well as each having their own personal use. Some data from Nielsen supports his personal observations.</p>
<p><img class="alignnone size-full wp-image-1754" title="Device Sharing" src="http://www.capturetheconversation.com/wp-content/uploads/2010/11/Picture-6.png" alt="" width="364" height="378" /></p>
<p>I&#8217;m interested in how this sharing takes place live, and how this shared aspect impacts the kinds of apps/sites popular on an iPad versus a phone or computer. While Google TV, Apple TV, Roku, Boxee, etc. are including integration that makes my TV social, a shared tablet <em>while</em> watching TV could create a whole other kind of social experience layered onto the TV experience. No longer would I just sit there sharing IMDB and Facebook facts with my friends/anyone who will listen. We could actively participate around entertainment. Send me any examples you see of this happening, as I&#8217;d love to get them posted up here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.capturetheconversation.com/fun/sharing-your-social-devices/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone, Facebook, oAuth 2.0 and the Graph API. A Tutorial, Part 2.</title>
		<link>http://www.capturetheconversation.com/technology/iphone-facebook-oauth-2-0-and-the-graph-api-a-tutorial-part-2</link>
		<comments>http://www.capturetheconversation.com/technology/iphone-facebook-oauth-2-0-and-the-graph-api-a-tutorial-part-2#comments</comments>
		<pubDate>Tue, 29 Jun 2010 19:50:27 +0000</pubDate>
		<dc:creator>Room214</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook Graph API]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[oAuth]]></category>
		<category><![CDATA[oAuth 2.0]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.capturetheconversation.com/?p=1273</guid>
		<description><![CDATA[NOTE: I&#8217;ve moved the source code for this project to Git Hub, please get it here:  http://github.com/reallylongaddress/iPhone-Facebook-Graph-API
Preface
In part 1 of this tutorial we walked through obtaining an oAuth 2.0 access token from Facebook via an iPhone (or any iTouch device).  If you wish to go back and review the oAuth 2.0 process in some detail HERE.
In the second part of this tutorial I’ll show you how to leverage my pseudo-API to:

Login to Facebook using oAuth 2.0
Request extended permissions for your mobile application (photos, videos, publish stream and offline access)
Get your profile data
Get your friend list
Get your feed
Post to your feed
Post a photo (via a local image (UIImage) not a url)
Get metadata
Delete a feed post (via a Post)
Get search results
Get (and display) the author’s avatar

 
Convention
There are 2 APIs being talked about in this tutorial. To avoid confusion, I’m going to refer to them consistently as Facebook’s  ‘Graph API’ and my...]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE:</strong> I&#8217;ve moved the source code for this project to Git Hub, please get it here:  <a title="FbGraphAPI" href="http://github.com/reallylongaddress/iPhone-Facebook-Graph-API" target="_blank">http://github.com/reallylongaddress/iPhone-Facebook-Graph-API</a></p>
<p><strong>Preface</strong></p>
<p>In part 1 of this tutorial we walked through obtaining an <strong>oAuth 2.0 access token from Facebook via an iPhone</strong> (or any iTouch device).  If you wish to go back and review the oAuth 2.0 process in some detail <a title="iPhone, Facebook, oAuth 2.0 and the Graph API. A Tutorial." href="http://www.capturetheconversation.com/technology/iphone-facebook-oauth2-graph-api" target="_blank">HERE</a>.</p>
<div id="attachment_1286" class="wp-caption aligncenter" style="width: 468px"><img class="size-large wp-image-1286" title="combined" src="http://www.capturetheconversation.com/wp-content/uploads/2010/06/combined1-458x431.png" alt="iPhone oAuth Facebook login and extended permissions images" width="458" height="431" /><p class="wp-caption-text">Facebook Login and Extended Permission Dialogs</p></div>
<p>In the second part of this tutorial I’ll show you how to leverage my pseudo-API to:</p>
<ul>
<li>Login to Facebook using oAuth 2.0</li>
<li>Request <strong>extended permissions for your mobile application</strong> (photos, videos, publish stream and offline access)</li>
<li>Get your profile data</li>
<li>Get your friend list</li>
<li>Get your feed</li>
<li>Post to your feed</li>
<li>Post a photo (via a local image (UIImage) not a url)</li>
<li>Get metadata</li>
<li>Delete a feed post (via a Post)</li>
<li>Get search results</li>
<li>Get (and display) the author’s avatar</li>
</ul>
<p><strong> </strong></p>
<p><strong>Convention</strong></p>
<p>There are 2 APIs being talked about in this tutorial. To avoid confusion, I’m going to refer to them consistently as Facebook’s  ‘Graph API’ and my ‘pseudo-API’*.  <a title="Facebook Graph API" href="http://graph.facebook.com" target="_blank">Facebook’s Graph API</a> is the stuff we’re interacting with via HTTP Get and Post calls.  The pseudo-API is the Objective-C/iPhone code that’s facilitating the interaction.</p>
<p><strong> </strong></p>
<p><em>*-I call it a pseudo-API if for no other reason I haven’t proven to myself it supports 100% of the Facebook Graph API functions.</em></p>
<blockquote><p>An aside about my API design philosophy:  I could have written the pseudo-API to be much more robust and feature rich, with exceptions, logging, auto-magical json parsing, full featured functions like ‘getMyWallFeed’, etc.  However with robustness and features comes complexity and dependencies.  I kept everything aside from the absolute core functionality required to read/write data from/to the Facebook Graph API out of this implementation.  In short, I’ve left it primitive enough that anybody should be able to extend/wrap it easily, if they see fit.</p></blockquote>
<p>The pseudo-API has only 3 classes.  The core functionality lies in the FbGraph.m file.  The other two classes support this core class.  FbGraphFile is used when uploading a file to Facebook.  FbGraphResponse is, I would hope, self-explanatory.</p>
<p>We’re going to skip over the steps required to create a Facebook application.  I covered that in Part 1<a href="../technology/iphone-facebook-oauth2-graph-api"></a>:  <a title="iPhone, Facebook, oAuth 2.0 and the Graph API. A Tutorial." href="http://www.capturetheconversation.com/technology/iphone-facebook-oauth2-graph-api" target="_blank">iPhone, Facebook, oAuth 2.0 and the Graph API.  A Tutorial</a>.  If you completed part 1 of the tutorial, you can use the same Facebook application without modification here.</p>
<p><strong>Sample Code:</strong></p>
<p><a title="FbGraphAPI" href="http://github.com/reallylongaddress/iPhone-Facebook-Graph-API" target="_blank">http://github.com/reallylongaddress/iPhone-Facebook-Graph-API</a></p>
<p><strong>Creating the FbGraph Object</strong></p>
<p>Before we can interact with the Graph API, we need to make a connection to it. And before we make a connection to it, we need a FbGraph object instance.  We do so like:</p>
<pre>self.fbGraph = [[FbGraph alloc]initWithFbClientID:client_id];</pre>
<p>Where:</p>
<pre>FbGraph *fbGraph;</pre>
<p>And</p>
<pre>NSString *client_id = @"123145257717248";</pre>
<p>The client_id should be YOUR Facebook application id.  I’ve left my application ID in here for no other reason than the tutorial code will work ‘out of the box’.</p>
<p><strong>The login process</strong></p>
<p>Now we have our fbGraph object instance, we’ll want to ask Facebook for a login screen.  Additionally we’ll need to let Facebook know the extended permissions we’re requesting for our app.  Here’s the code to do that:</p>
<pre>[fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(fbGraphCallback:) andExtendedPermissions:@"user_photos,user_videos,publish_stream,offline_access"];</pre>
<p>There are 3 major things to note in this line (found in oAuth2TestViewController).</p>
<p>1)  We’re asking the fbGraph object to initialize the authentication process by calling the function: authenticateUserWithCallbackObject</p>
<p>2)  We’re setting a callback object (self) and a callback function (fbGraphCallback).   This object and function will be called upon completion of the oAuth authentication process.</p>
<p>3)  We’re requesting extended permissions:@&#8221;user_photos,user_videos,publish_stream,offline_access”</p>
<p>When this function is called, the pseudo-API will find the root application window**, stick in a UIWebView, and ask Facebook for a login screen (passing along your client_id and requested extended permissions):</p>
<pre>NSString *url_string = [NSString stringWithFormat:@"https://graph.facebook.com/oauth/authorize?client_id=%@&amp;redirect_uri=%@&amp;scope=%@&amp;type=user_agent&amp;display=touch", facebookClientID, redirectUri, extended_permissions];</pre>
<p><em>**-There’s a second </em><em>authenticateUserWithCallbackObject function that allows you to specify a specific view you wish the login screen to be anchored/rendered in, if you don’t want it to render within the root view of your application.  Look at the FbGraph class for further details.</em><em> </em></p>
<p>Note the ‘<strong>display=touch</strong>’ parameter.  It tells Facebook we’d like a login screen optimized for an iPhone/iPod touch screen.</p>
<p>Now that the process is started the UIWebView will render the login window that Facebook has returned to us.</p>
<p>After you’ve successfully authenticated to Facebook, you will be presented with a second screen with an extended permissions request dialog.  2 things to note here:  First, all permissions are unified into a single step.  Second, after you’ve approved the permissions, you won’t have to complete this step or see this screen again (so long as you don’t revoke the permissions).</p>
<p><strong>Under the Hood of the Authentication Process</strong></p>
<p>There’s some http redirects involved with the oAuth 2.0 (User-Agent flow) login process.  The FbGraph object is a UIWebViewDelegate, one of the functions associated with this delegate class is: webViewDidFinishLoad.  This function is called several times during the authentication process.  When the URL contains “<a href="http://www.facebook.com/connect/login_success.html#access_token=..........">access_token=</a>” we’re golden.  We’ve successfully logged into Facebook.  When the pseudo-API sees this string, it parses out our oAuth access token, stores it to a class level variable, removes the UIWebView we inserted and finally calls the callback function we defined, returning control to your application.</p>
<p><strong>The Rest of the Pseudo-API</strong></p>
<p>The core of the pseudo-API is about 250 lines of code (including whitespace and comments), which is very little indeed.  This is possible because the Facebook Graph API does everything via simple HTTP Gets and Posts.  In fact, once you’ve figured out how to do Get and Post with the Graph API, you’ve pretty much figured out everything.</p>
<p>If you’re familiar with the current Facebook Connect implementation, you’ll immediately notice Graph API is immeasurably less complex and more consistent.</p>
<p>So, I could go through and explain how everything works in painful (and highly repetitive) detail…but I’m going to peace out, let you read over the code, dissect it, add some breakpoints and get your hands dirty.</p>
<p>FYI:  There is very intentionally very little UI in the app. Rather than having you, the reader, have to figure out my UI conventions as well as Interface Builder, I’ve kept it simple and dumped most all output to the debugger console.  The code is simple, the pseudo-API is simple, the Graph API is simple……</p>
<p>I hope you take a look at my pseudo-API and agree, it’ simple…that’s the idea.</p>
<p>If you find this post useful, if you include this code or the concepts you learned here in an app, if you extend this into a more full featured API….I’d love to know!</p>
<p>Happy hacking.</p>
<p><a href="http://www.twitter.com/dominicdimarco">Dominic</a></p>
<p><a href="mailto:ddimarco@room214.com">ddimarco@room214.com</a></p>
<p><a href="http://twitter.com/dominicdimarco">@dominicdimarco</a></p>
<p><strong>Sample Code:</strong></p>
<p><a title="FbGraphAPI" href="http://github.com/reallylongaddress/iPhone-Facebook-Graph-API" target="_blank">http://github.com/reallylongaddress/iPhone-Facebook-Graph-API</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.capturetheconversation.com/technology/iphone-facebook-oauth-2-0-and-the-graph-api-a-tutorial-part-2/feed</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
	</channel>
</rss>

