<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -32,7 +32,7 @@ package fb {
   import flash.net.URLRequest;
   import flash.net.URLRequestMethod;
   import flash.net.URLVariables;
-
+  import mx.utils.ObjectUtil;
   import mx.controls.HTML;
 
   public class FBAPI {
@@ -121,15 +121,14 @@ package fb {
       callCount++;
 
       var urlArgs:URLVariables = new URLVariables();
-      if (callArgs) {
-        for (var key:String in callArgs) {
-          if (callArgs[key] is Array) {
+      if (callArgs)
+        for (var key:String in callArgs)
+          if (!ObjectUtil.isSimple(callArgs[key]))
+            urlArgs[key] = JSON.encode(callArgs[key]);
+          else if (callArgs[key] is Array)
             urlArgs[key] = callArgs[key].join(&quot;,&quot;);
-          } else {
+          else
             urlArgs[key] = callArgs[key];
-          }
-        }
-      }
 
       urlArgs['v'] = '1.0';
       urlArgs['format'] = 'JSON';</diff>
      <filename>fb/FBAPI.as</filename>
    </modified>
    <modified>
      <diff>@@ -210,13 +210,14 @@
       // We build our fql query here to call restserver.php.
       // {&quot;order by time desc&quot;} allows us to ensure we get the newest, in order.
       // {&quot;and time &gt; &quot; + latestUpdate} allows us to just get deltas.
-      var query:JSONLoader = FBAPI.callMethod(&quot;fql.query&quot;, {
-        query:&quot;select post_id, source_id, created_time, actor_id, &quot; +
+      var query:JSONLoader = FBAPI.callMethod(&quot;fql.multiquery&quot;, {
+        queries:{stream:&quot;select post_id, source_id, created_time, actor_id, &quot; +
           &quot;target_id, app_id, message, attachment, comments, likes, &quot; +
           &quot;permalink, attribution, type, filter_key &quot; +
           &quot;from stream where &quot; +
           requested_filters.join(&quot; or &quot;) + &quot; &quot; +
-          &quot;order by created_time desc&quot;
+          &quot;order by created_time desc&quot;,
+          comments:&quot;select post_id, id, fromid, text, time, &quot;}
       });
       query.addEventListener(FBEvent.SUCCESS, updatesReturned);
       query.addEventListener(FBEvent.RETRY, queryRetried);
@@ -230,7 +231,11 @@
 
     // Called every time we have new updates from the server
     private function updatesReturned(event:FBEvent):void {
-      data = event.data;
+      var resultsByKey:Object = new Object();
+      for each (var result:Object in event.data)
+        resultsByKey[result.name] = result.results;
+
+      data = resultsByKey.stream;
       if (dataCache[CurrentFilter])
         addEventListener(Event.ENTER_FRAME, afterUpdatesReturned);
     }</diff>
      <filename>fbair/nile/NileContainer.mxml</filename>
    </modified>
    <modified>
      <diff>@@ -190,12 +190,11 @@
       // Now lets bind to the count to see when to refetch
       commentCount = data.comments.count;
       if (countWatcher) countWatcher.unwatch();
-      countWatcher = BindingUtils.bindSetter(function(new_count:int):void {
-        callLater(updatedCommentCount, [new_count]);
-      }, data, [&quot;comments&quot;, &quot;count&quot;]);
+      countWatcher = BindingUtils.bindSetter(updateCommentCount,
+        data, [&quot;comments&quot;, &quot;count&quot;]);
     }
 
-    private function updatedCommentCount(new_count:int):void {
+    private function updateCommentCount(new_count:int):void {
       // If we have more than max, then display link
       allCommentsContainer.visible = (new_count &gt; MaxComments);
 </diff>
      <filename>fbair/nile/renderers/CommentsRenderer.mxml</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,18 @@
+/*
+  Copyright Facebook Inc.
+
+  Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
 package fbair.util.display {
 
   import mx.containers.Box;</diff>
      <filename>fbair/util/display/FlowBox.as</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,18 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2006 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
+/*
+  Copyright Facebook Inc.
 
+  Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
 package fbair.util.display.layout {
 
   import mx.styles.IStyleClient;</diff>
      <filename>fbair/util/display/layout/FlowBoxLayout.as</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c90c261b1a6990a31ad9c61819d0b1a9e0fa5c44</id>
    </parent>
  </parents>
  <author>
    <name>Justin Bishop</name>
    <email>jubishop@gmail.com</email>
  </author>
  <url>http://github.com/jubishop/Facebook-for-Adobe-AIR/commit/d90ff7b3b0d189e07cbb950ae05a9b9b23cd6ebf</url>
  <id>d90ff7b3b0d189e07cbb950ae05a9b9b23cd6ebf</id>
  <committed-date>2009-06-08T14:24:43-07:00</committed-date>
  <authored-date>2009-06-08T14:24:43-07:00</authored-date>
  <message>functionally using multiquery, but to no advantage yet. :/</message>
  <tree>42af4d7e71405dab5a88188ad81a3586e4bc6f81</tree>
  <committer>
    <name>Justin Bishop</name>
    <email>jubishop@gmail.com</email>
  </committer>
</commit>
