Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Abdul Muttaqin
- #523 Cyber Art
- <?php
- $access_token= "TOKENKAMU";
- $me = json_decode(auto('https://graph.facebook.com/me?access_token='.$access_token.'&fields=id'),true);
- $dg = json_decode(auto('https://graph.facebook.com/me/groups?access_token='.$access_token.'&method=GET&limit=50'),true);
- $message= ("Hay :v");
- for($i=1;$i<=count($dg[data]);$i++){
- if(!ereg($dg[data][$i-1][id])){
- echo auto('https://graph.facebook.com/'.$dg[data][$i-1][id].'/feed?message='.urlencode($message).'&access_token='.$access_token.'&method=post').'<hr/>';
- }
- }
- function auto($url){
- $ch=curl_init();
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch,CURLOPT_URL,$url);
- $cx=curl_exec($ch);
- curl_close($ch);
- return($cx);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement