Search code examples
phpfacebookphotos

Display Facebook photos on website


There are topics about statuses, walls and profiles, but none about photos...

What I'm trying to achieve is to display the photos of my page/profile/etc. onto my website. I stumbled upon an FQL method in combination with Lightbox. It seems to do everything I need, except for some reason the FaceBook API isn't connecting with Facebook. This array remains empty.

$fql = "SELECT aid, cover_pid, name FROM album WHERE owner=11239244970";
   $param  =   array(
     'method'    => 'fql.query',
     'query'     => $fql,
     'callback'  => ''
   );
$fqlResult   =   $facebook->api($param);

Are there other alternatives or any tips/hints you can give?


Solution

  • Don't forget that you need user_photos permission to access your own non-public albums, otherwise you'll just get an empty array as you're describing. Read documentation for more details