Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 24th, 2012  |  syntax: None  |  size: 0.60 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. View Page that is Age Restricted
  2. $FBid   = '116312615074882'; // Will add a Admin item for this
  3.  
  4.     //Get the contents of a Facebook page
  5.     $FBpage = file_get_contents('https://graph.facebook.com/'.$FBid.'/albums');
  6.     //Interpret data with JSON
  7.     $photoData = json_decode($FBpage);
  8.  
  9.     foreach($photoData->data as $data) {
  10.  
  11.         $images[] = array(
  12.                     'id' => $data->id,
  13.                     'name' => $data->name
  14.                     );
  15.     }
  16.  
  17.     $this->data->images = $images;
  18.         $this->template
  19.         ->title('Facebook Gallery')
  20.         ->build('index', $this->data);