title: Getting Facebooks' Cover Photo via PHP SDK & Graph API
body: <p>I'd like to know if there is a simple way of retrieving the Cover photo from a user in my application, via the Facebook php sdk.</p>
  <p>I managed to retrieve the cover photo id of the album of the cover photo album, but my solution only works partially. (As you can see, it's not efficient, and If more albums will be added, and moved to other pages, thus this will not work).</p>
  <pre><code>    $albums = $facebook-&gt;api('/me/albums','GET');
      for($i = 0;$i&lt;count($albums['data']);$i++){
          for($j = 0;$j&lt;count($albums['data'][$i]);$j++){
              if($albums['data'][$i]['name'] == &quot;Cover Photos&quot;){
                  echo $facebook-&gt;api('/me/albums/'.$albums['data'][$i]['cover_photo'],'GET');
              }
          }
      }
  </code></pre>