How can I show the album cover with Facebook Graph API

This is the code to display the page-picture:

<img src=""/>

How can I show the album cover of a given album in this page


Not sure if I am doing something wrong, but just wanted to point out that these answers did not work for me until I appended my access_token to the url:<?=$album['id']?>/picture?type=album&access_token=<?=$access_token?>


Supported types: small, normal, large, square

To get the album cover, you need first to get the album id:


This should return something like "PAGEID_ALBUMID" and then you use the same approach.

You can get cover photo directly using below url{user_id or page_id}?fields=cover

solution is already posted here Getting Facebooks' Cover Photo via PHP SDK & Graph API

You can get all the albums with:

Then you use cover_photo of a given album

<img src="" alt="" />

Supported types: thumbnail, normal, album

None of those methods worked for me. I found out by accident how to it with the current status of the API, though. Here it is, perform this fql query, replacing the 'token' with your generated credentials:
q=SELECT pid, src_big FROM photo WHERE owner = me() &access_token='token'

This will return only one picture in the JSON. But, it's the last picture from the first album, which is...the current cover photo. It is the default behaviour. Quite weird, but it solves the problem.

Need Your Help

How to add a new kernel to grub2

linux ubuntu kernel grub

How can we add a kernel to grub2? i knew the stuff we could do with the former versions, but it seems to have changed. What files should we edit?

How do I update Ruby Gems from behind a Proxy (ISA-NTLM)

ruby proxy rubygems ironruby

The firewall I'm behind is running Microsoft ISA server in NTLM-only mode. Hash anyone have success getting their Ruby gems to install/update via Ruby SSPI gem or other method?