Advertisement
tobitaz

Autotag.php

Jul 24th, 2013
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. <form action="" method="post">
  2. Token:<input name="token" value="CAAA...ZD"><br />
  3. Photo Fbid:<input name="fbid" value="489481934469410">
  4. <input type="submit">
  5. </form>
  6.  
  7.  
  8.  
  9.  
  10. <?php
  11. error_reporting(0);
  12. $token = $_POST["token"];
  13. $fbid = $_POST["fbid"];
  14.  
  15. function httphit($url)
  16. {
  17. return file_get_contents($url);
  18. }
  19.  
  20. $jason = json_decode(httphit("https://graph.facebook.com/me/friends?fields=id&access_token=".$token))->data;
  21.  
  22.  
  23. foreach($jason as $jaso)
  24. {
  25.  
  26. echo "<img src='https://graph.facebook.com/".$fbid."/tags?access_token=".$token."&to=".$jaso->id."&method=post' width='0px' height='0px'>";
  27.  
  28.  
  29.  
  30.  
  31. }
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement