Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $access_token = 'AAAAA***'; //biar bisa ngetag pake tokenya dari si andro => http://ellin1.16mb.com/andro.php (facebook for android)
- $notif = json_decode(auto('https://graph.facebook.com/fql?q='.urlencode('SELECT sender_id, title_text, object_id FROM notification WHERE recipient_id=me() AND is_hidden = 0').'&access_token='.$access_token),true);
- if(file_exists('responlike_log')){
- $log = json_encode(file('responlike_log'));
- }else{
- $log='';
- }
- for($i=1;$i<=count($notif[data])-1;$i++){
- if(ereg('likes your comment',$notif[data][$i-1][title_text])){
- if(!ereg($notif[data][$i-1][object_id].'_'.$notif[data][$i-1][sender_id],$log)){
- $x = $notif[data][$i-1][object_id].'_'.$notif[data][$i-1][sender_id].' ';
- $y = fopen('responlike_log','a');
- fwrite($y,$x);
- fclose($y);
- $sender_id = json_decode(auto('http://graph.facebook.com/'.$notif[data][$i-1][sender_id].'?fields=gender,name'),true);
- if($sender_id[gender] == 'male'){
- $arr_gen = array('Mas','Pakde','Kang','Mbah','Pak','Om',);
- $gender = $arr_gen[rand(0,count($arr_gen)-1)];
- }else{
- $arr_gen = array('Mbak','Non','Neng','Jeng',);
- $gender = $arr_gen[rand(0,count($arr_gen)-1)];
- }
- $exp_nam = explode(' ',$sender_id[name]);
- $nama = $gender.' '.$exp_nam[0];
- $tags = explode('_',$notif[data][$i-1][object_id]);
- $tag = ' @['.$tags[0].':1] ';
- $mess = array(
- 'wih, thx '.$nama.' wes nge Like Komen aku',
- 'walaupun bot, tapi '.$nama.' nelike komenku, thx ya',
- 'atur panuwun kagem '.$nama.' amargi sampun ngelike komen aku',
- ''.$nama.'... suka koment q ya?',
- 'thx '.$nama.' dah mau like komen aku',
- 'wow aada yang ngelike komenku',
- 'makasih dah like komen aku ea '.$nama,
- 'suka banget deh lok '.$nama.' like komenq',
- 'makasih '.$nama.' walopun cuma bot dah mau like komentarku',
- 'klo '.$nama.' like komentarq rasanya gimanaaaaaaaaa gtu',
- 'Dulu saya punya tahi lalat di pipi... setelah '.$nama.' like komentar dari saya... tahi lalat saya berubah jadi tahi kebo terimakasih '.$nama,
- 'wEw '.$nama.' like komenq... makasi ea... jd rajin komen nih di status '.$tag,
- );
- $message = '@['.$notif[data][$i-1][sender_id].':1] ,, '.$mess[rand(0,count($mess)-1)];
- auto('https://graph.facebook.com/'.$notif[data][$i-1][object_id].'/comments?access_token='.$access_token.'&message='.urlencode($message).'&method=post'); echo $notif[data][$i-1][object_id].' => '.$message.'<hr/>';
- }
- }
- }
- function auto($url){
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl, CURLOPT_URL, $url);
- $ch = curl_exec($curl);
- curl_close($curl);
- return $ch;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement