<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -16,6 +16,12 @@ h2. Installation
 # In 'Edit Details', configure the callback urls, external url, external domain
 # Configure your authorization url in app.php on line 72.
 
+h2. Known Issues
+
+# Not properly catching Exceptions
+	* _Server Too Busy_ timeouts.  Apparently MySpace is having some queuing issues via some badly behaving 3rd party apps.  
+	* _Request Token Timeout_.  This app contains no state via a database or session cooke [I want to do this].  So the request token times out if you keep refreshing the results page.
+
 h2. Links
 
 * &quot;TechCrunch MySpace App&quot;:http://www.techcrunch.com/myspace/app.php</diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -9,35 +9,42 @@ require_once(&quot;app-config.php&quot;); // &lt;-- SET YOUR KEY/SECRET HERE
 // Set the key - application uri - secret key
 $myspace = new MySpaceAPI(Config::$APP_OAUTH_CONSUMER_KEY, Config::$APP_OAUTH_CONSUMER_SECRET);
 
+# checks for install param
 $install=$HTTP_GET_VARS['install'];
 
+# IF THE INSTALL PARAMETER EXISTS -- ie, the user as authenticated and this page
+# has been hit by the install callback
+# 
 if ($install) {
-	echo &quot;You have installed the TechCrunch MySpace OAuth App.&lt;br /&gt;&quot;;
-	#for ($counter = 0; $counter &lt; count($HTTP_GET_VARS); $counter += 1) {
-   if (isset($_REQUEST[&quot;oauth_token&quot;])) {
-        $request_token = $_REQUEST[&quot;oauth_token&quot;];
-   }
-   if (isset($_REQUEST[&quot;oauth_token_secret&quot;])) {
-        $request_token_secret = $_REQUEST[&quot;oauth_token_secret&quot;];
-   }
-	#}
+	echo &quot;You have installed an MySpace OAuth App.&lt;br /&gt;&quot;;
+	# checks for oauth_token in the URL params
+	if (isset($_REQUEST[&quot;oauth_token&quot;])) {
+	     $request_token = $_REQUEST[&quot;oauth_token&quot;];
+	}
+	# checks for oauth_token_secret in the URL params	
+	if (isset($_REQUEST[&quot;oauth_token_secret&quot;])) {
+	     $request_token_secret = $_REQUEST[&quot;oauth_token_secret&quot;];
+	}
 		
+	# sets the request token
 	$myspace-&gt;set_oauth_token($request_token);
 	$myspace-&gt;set_oauth_token_secret($request_token_secret);
 	
-	$access_token = $myspace-&gt;OAuthToken-&gt;get_access_token();
+	# gets ths access token
+	$access_token = $myspace-&gt;OAuthToken-&gt;get_access_token();	
+	# not sure why this is necessary
 	$req_token = $myspace-&gt;OAuthToken-&gt;get_token_from_url($access_token);
 	$req_token_secret = $myspace-&gt;OAuthToken-&gt;get_token_secret_from_url($access_token);
-	
-	
+		
+	# reset the oauth request tokens. again, not sure why necessary
 	$myspace-&gt;set_oauth_token($req_token);
 	$myspace-&gt;set_oauth_token_secret($req_token_secret);
 	
-	// get the current user profile and userId for other requests
-	// --------------------------------------------------------------------
+	// get the current user profile
 	$result = $myspace-&gt;People-&gt;get_people_profile_current();
 	$obj = json_decode($result);
 
+	# print out some stuff
 	echo &quot;&lt;br/&gt;&quot;;
 	echo &quot;&lt;big&gt;&lt;strong&gt;Here's some of your MySpace Data&lt;/strong&gt;&lt;/big&gt;&quot;;
 	echo &quot;&lt;br/&gt;&quot;;
@@ -48,19 +55,28 @@ if ($install) {
 	echo &quot;&lt;br/&gt;&quot;;	
 	echo &quot;&lt;strong&gt;About Yourself&lt;/strong&gt;: &quot; . $obj-&gt;{'aboutMe'};
 
+	# get some friends (there's default pagination on this, so only gets 10 or so)
 	$result = $myspace-&gt;People-&gt;get_people_friends_current();
 
 	echo &quot;&lt;br/&gt;&quot;;
 	echo &quot;&lt;br/&gt;&quot;;
 	echo &quot;&lt;strong&gt;Some of your friends: &lt;/strong&gt;&quot;;
+	
+	# grabs all the friends id, returns as an array
 	$friends = json_decode($result)-&gt;{'entry'};
+	# loop through friends
 	for ($i = 0; $i &lt; count($friends); $i++) {
+		# get the id
 		$id = $friends[$i]-&gt;{'id'};
+		# do another lookup for more data on that friend
 		$result = $myspace-&gt;People-&gt;get_people_profile($id);
 		echo &quot;&lt;br/&gt;&quot;;
+		# create a link to their user page using a default url
 		echo &quot;&lt;a href=\&quot;http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&amp;friendid=&quot; . preg_replace(&quot;/myspace\.com\:/&quot;, &quot;&quot;, $id) . &quot;\&quot;&gt;&quot; . json_decode($result)-&gt;{'name'}-&gt;{'unstructured'} . &quot;&lt;/a&gt;&quot;;
 	}	
 }
+# Otherwise, assume that the user is coming to the page for the first time 
+#
 else {
 
 	// Example Request using request/access</diff>
      <filename>app.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>833c8daa3a5040e0442119a8e40976f6032c93b7</id>
    </parent>
  </parents>
  <author>
    <name>Henry Work</name>
    <email>henry@techcrunch.com</email>
  </author>
  <url>http://github.com/techcrunch/myspace_oauth/commit/e1ffaf48f390a62d9ce6f36c4a67a9b493f0840b</url>
  <id>e1ffaf48f390a62d9ce6f36c4a67a9b493f0840b</id>
  <committed-date>2008-06-26T22:24:04-07:00</committed-date>
  <authored-date>2008-06-26T22:24:04-07:00</authored-date>
  <message>* More commenting
* More README work</message>
  <tree>192724dc34148994c44ec7f293e72b7a03fa75f4</tree>
  <committer>
    <name>Henry Work</name>
    <email>henry@techcrunch.com</email>
  </committer>
</commit>
