Facebook API

FQL

SELECT name, affiliations FROM user
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=211031)
      AND "Facebook" IN affiliations.name AND uid < 10

SELECT src, caption, 1+2*3/4, caption, 10*(20 + 1) FROM photo
WHERE pid IN (SELECT pid FROM photo_tag WHERE subject=211031) AND
      pid IN (SELECT pid FROM photo_tag WHERE subject=204686) AND
      caption
Results in
<?xml version="1.0" encoding="UTF-8"?>
<fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
  <user>
    <name>Mark Zuckerberg</name>
    <affiliations list="true">
      <affiliation>
        <nid>50431648</nid>
        <name>Facebook</name>
        <type>work</type>
        <status/>
        <year/>
      </affiliation>
      <affiliation>
        <nid>16777217</nid>
        <name>Harvard</name>
        <type>college</type>
        <status>Undergrad</status>
        <year/>
      </affiliation>
      <affiliation>
        <nid>67108894</nid>
        <name>San Francisco, CA</name>
        <type>region</type>
        <status/>
        <year/>
      </affiliation>
    </affiliations>
  </user>
  <user>
    <name>Chris Hughes</name>
    <affiliations list="true">
      <affiliation>
        <nid>50431648</nid>
        <name>Facebook</name>
        <type>work</type>
        <status/>
        <year/>
      </affiliation>
      <affiliation>
        <nid>16777217</nid>
        <name>Harvard</name>
        <type>college</type>
        <status>Alumnus/Alumna</status>
        <year>2006</year>
      </affiliation>
      <affiliation>
        <nid>67108869</nid>
        <name>Washington, DC</name>
        <type>region</type>
        <status/>
        <year/>
      </affiliation>
      <affiliation>
        <nid>67108894</nid>
        <name>San Francisco, CA</name>
        <type>region</type>
        <status/>
        <year/>
      </affiliation>
    </affiliations>
  </user>
  <user>
    <name>Dustin Moskovitz</name>
    <affiliations list="true">
      <affiliation>
        <nid>50431648</nid>
        <name>Facebook</name>
        <type>work</type>
        <status/>
        <year/>
      </affiliation>
      <affiliation>
        <nid>16777217</nid>
        <name>Harvard</name>
        <type>college</type>
        <status>Undergrad</status>
        <year/>
      </affiliation>
      <affiliation>
        <nid>16777219</nid>
        <name>Stanford</name>
        <type>college</type>
        <status>Staff</status>
        <year/>
      </affiliation>
      <affiliation>
        <nid>67108894</nid>
        <name>San Francisco, CA</name>
        <type>region</type>
        <status/>
        <year/>
      </affiliation>
      <affiliation>
        <nid>67108896</nid>
        <name>Silicon Valley, CA</name>
        <type>region</type>
        <status/>
        <year/>
      </affiliation>
      <affiliation>
        <nid>67109006</nid>
        <name>Ocala, FL</name>
        <type>region</type>
        <status/>
        <year/>
      </affiliation>
    </affiliations>
  </user>
</fql_query_response>


<?xml version="1.0" encoding="UTF-8"?>
<fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
  <photo>
    <src>http://photos-923.ak.facebook.com/ip002/v61/188/75/206412/s206412_31508923_7923.jpg</src>
    <caption>celebrating 23 years of ari's life at the one and the oasis.</caption>
    <anon>2.5</anon>
    <caption>celebrating 23 years of ari's life at the one and the oasis.</caption>
    <anon>210</anon>
  </photo>
  <photo>
    <src>http://photos-447.ak.facebook.com/ip005/v40/164/17/202965/s202965_30849447_4635.jpg</src>
    <caption>Liar's Dice...</caption>
    <anon>2.5</anon>
    <caption>Liar's Dice...</caption>
    <anon>210</anon>
  </photo>
  <photo>
    <src>http://photos-480.ak.facebook.com/ip005/v29/188/75/206412/s206412_30452480_140.jpg</src>
    <caption>the crew. (RishDAWG!)</caption>
    <anon>2.5</anon>
    <caption>the crew. (RishDAWG!)</caption>
    <anon>210</anon>
  </photo>
  <photo>
    <src>http://photos-103.ak.facebook.com/ip001/v12/188/75/206412/s206412_30325103_6676.jpg</src>
    <caption>group photo!!!!</caption>
    <anon>2.5</anon>
    <caption>group photo!!!!</caption>
    <anon>210</anon>
  </photo>
  <photo>
    <src>http://photos-399.ak.facebook.com/ip001/v10/188/75/206412/s206412_30191399_9134.jpg</src>
    <caption>someone is particularly happy to be in this picture</caption>
    <anon>2.5</anon>
    <caption>someone is particularly happy to be in this picture</caption>
    <anon>210</anon>
  </photo>
  <photo>
    <src>http://photos-716.ak.facebook.com/ip007/v16/129/99/204686/s204686_30190716_7256.jpg</src>
    <caption>One of the most extravagant.</caption>
    <anon>2.5</anon>
    <caption>One of the most extravagant.</caption>
    <anon>210</anon>
  </photo>
</fql_query_response>

José M. Vidal .

9 of 10