Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require("fb/facebook.php");
- # Creating the facebook object
- $facebook = new Facebook(array(
- 'appId' => '***************', // APP ID
- 'secret' => '********************************', // TOKEN
- 'cookie' => true
- ));
- # Let's see if we have an active session
- $session = $facebook->getUser();
- $post = $facebook->api('/510250905727300/likes?limit=1000');
- $post2 = $facebook->api('510250905727300/likes?limit=1000&after=MTY1MzMzMzE4Nw%3D%3D');
- $firstcount = count($post['data']);
- $secondcount = count($post2['data']);
- $realcount = $firstcount + $secondcount;
- ?>
- <!DOCTYPE HTML>
- <html lang="fr">
- <head>
- <meta charset="UTF-8"/>
- </head>
- <body>
- <p>Liste des likes (du + récent au + ancien) du <a href="https://www.facebook.com/soutienaubijoutierdenice/posts/510250905727300" target="_blank">premier post</a> de la page Soutien au bijoutier de Nice</p>
- <?php
- $x = 0;
- while($post['data'][$x]){
- ?>
- <p><?php echo $realcount;?> - <img src="http://graph.facebook.com/<?php echo $post['data'][$x]['id'];?>/picture">
- <a href="http://www.facebook.com/profile.php?id=<?php echo $post['data'][$x]['id'];?>" target="_blank"><?php echo $post['data'][$x]['name'];?>
- </a>
- </p>
- <?php
- $x++;
- $realcount--;
- }
- $i = 0;
- while($post2['data'][$i]){
- ?>
- <p><?php echo $realcount;?> - <img src="http://graph.facebook.com/<?php echo $post2['data'][$i]['id'];?>/picture">
- <a href="http://www.facebook.com/profile.php?id=<?php echo $post2['data'][$i]['id'];?>" target="_blank"><?php echo $post2['data'][$i]['name'];?></a>
- </p>
- <?php
- $i++;
- $realcount--;
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement