DedsecID

Auto Post Grup Fb

Dec 15th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. <?php
  2. $access_token= "ISI TOKEN FB";
  3.  
  4. $me = json_decode(auto('https://graph.facebook.com/me?access_token='.$access_token.'&fields=id'),true);
  5. $dg = json_decode(auto('https://graph.facebook.com/me/groups?access_token='.$access_token.'&method=GET&limit=200'),true); //Limit Bisa diubah Sesuka Kalian
  6.  
  7. $message= ("[OOT] test auto post IzlWhd"); //Pesan Yang Mau diPost
  8.  
  9. for($i=1;$i<=count($dg[data]);$i++){
  10. if(!ereg($dg[data][$i-1][id])){
  11. echo auto('https://graph.facebook.com/'.$dg[data][$i-1][id].'/feed?message='.urlencode($message).'&access_token='.$access_token.'&method=post').'<hr/>';
  12.    }
  13. }
  14.  
  15.  
  16. function auto($url){
  17.    $ch=curl_init();
  18.    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  19.    curl_setopt($ch,CURLOPT_URL,$url);
  20.    $cx=curl_exec($ch);
  21.   curl_close($ch);
  22.   return($cx);
  23.   }
  24. ?>
Add Comment
Please, Sign In to add comment