Advertisement
joris

All Code

Feb 26th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php
  2. require '../src/facebook.php';
  3. $facebook = new Facebook(array(
  4.   'appId'  => '339554932739410',
  5.   'secret' => 'xxxxxxxxxxx',
  6. ));
  7.  
  8. $pages = $facebook->api('/me/accounts');
  9.  
  10. foreach ($pages['data'] as $page) {
  11.     if($page['id']==171360273518){
  12.         $page_access_token = $page['access_token'];
  13.         $page_conversations = $facebook->api('/'.$page['id'].'/conversations', 'GET', array('access_token' => $page_access_token));
  14.         echo "<pre>";
  15.         var_dump($page_conversations);
  16.         echo "</pre>";
  17.     }else{
  18.         echo "Youre not admin";
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement