title: How can I view the photos on my website from facebook using Javascript?
body: <p>I have a page on facebook. <a href="https://www.facebook.com/pages/2playcz-Tenisov%C3%A1-%C5%A1kola/190320081093741" rel="nofollow">https://www.facebook.com/pages/2playcz-Tenisov%C3%A1-%C5%A1kola/190320081093741</a></p>
  
  <p>I would like to view photos on my website using ajax.</p>
  
  <p>How can I view the photos on the my website using javascript?</p>
  
  <p>I tried this:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
  
     $(function() {
      $.post('https://graph.facebook.com/190322704426812/photos',{
  
          }, function(data) {
  
      $.each(data, function(key, value) {
      //alert(key + ': ' + value);
  });
   },"json");
  
  });
      &lt;/script&gt;
  </code></pre>
  
  <p>DATA:</p>
  
  <pre><code>{
     "data": [
        {
           "id": "190322817760134",
           "from": {
              "name": "2play.cz - Tenisov\u00e1 \u0161kola",
              "category": "Sports league",
              "id": "190320081093741"
           },
           "picture": "http://photos-h.ak.fbcdn.net/hphotos-ak-snc7/303504_190322817760134_142853251_s.jpg",
           "source": "http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc7/303504_190322817760134_142853251_n.jpg",
           "height": 149,
           "width": 187,
           "images": [
              {
                 "height": 1631,
                 "width": 2048,
                 "source": "http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s2048x2048/303504_190322817760134_142853251_n.jpg"
              },
              {
                 "height": 149,
                 "width": 187,
                 "source": "http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc7/303504_190322817760134_142853251_n.jpg"
              },
              {
                 "height": 149,
                 "width": 187,
                 "source": "http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc7/303504_190322817760134_142853251_n.jpg"
              },
              {
                 "height": 382,
                 "width": 480,
                 "source": "http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s480x480/303504_190322817760134_142853251_n.jpg"
              },
              {
                 "height": 254,
                 "width": 320,
                 "source": "http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s320x320/303504_190322817760134_142853251_n.jpg"
              },
              {
                 "height": 143,
                 "width": 180,
                 "source": "http://photos-h.ak.fbcdn.net/hphotos-ak-snc7/303504_190322817760134_142853251_a.jpg"
              },
              {
                 "height": 103,
                 "width": 130,
                 "source": "http://photos-h.ak.fbcdn.net/hphotos-ak-snc7/303504_190322817760134_142853251_s.jpg"
              },
              {
                 "height": 103,
                 "width": 130,
                 "source": "http://photos-h.ak.fbcdn.net/hphotos-ak-snc7/s75x225/303504_190322817760134_142853251_s.jpg"
              }
           ],
           "link": "https://www.facebook.com/photo.php?fbid=190322817760134&amp;set=a.190322704426812.39225.190320081093741&amp;type=1",
           "icon": "http://static.ak.fbcdn.net/rsrc.php/v2/yz/r/StEh3RhPvjk.gif",
           "created_time": "2012-06-09T13:34:24+0000",
           "updated_time": "2012-06-09T13:34:25+0000"
        }
     ],
     "paging": {
        "next": "https://graph.facebook.com/190322704426812/photos?value=1&amp;redirect=1&amp;limit=25&amp;after=MTkwMzIyODE3NzYwMTM0"
     }
  }
  </code></pre>
  
  <p>There was an error:</p>
  
  <pre><code>{
     "error": {
        "message": "A user access token is required to request this resource.",
        "type": "OAuthException",
        "code": 102
     }
  }
  </code></pre>
  
  <p>I need to read the following line:</p>
  
  <pre><code>"picture": "http://photos-h.ak.fbcdn.net/hphotos-ak-snc7/303504_190322817760134_142853251_s.jpg"
  "source": "http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc7/303504_190322817760134_142853251_n.jpg"
  </code></pre>