Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /** dwisiswanto.my.id **/
- /*************************/
- $brp = "100"; // Pengen diLike sampe berapa?
- $token = "CAA...."; // Access Token
- function hajar($yuerel, $dataAing=null) {
- $cuih = curl_init();
- curl_setopt($cuih, CURLOPT_URL, $yuerel);
- if($dataAing != null){
- curl_setopt($cuih, CURLOPT_POST, true);
- curl_setopt($cuih, CURLOPT_POSTFIELDS, $dataAing);
- }
- curl_setopt($cuih, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($cuih, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($cuih, CURLOPT_SSL_VERIFYPEER, false);
- $eks = curl_exec($cuih);
- curl_close($cuih);
- return $eks;
- }
- $menta = hajar("https://graph.facebook.com/me/home?fields=id,from&limit=" . $brp . "&access_token=" . $token);
- $jason = json_decode($menta);
- foreach ($jason->data as $data) {
- $kirim = hajar("https://graph.facebook.com/" . $data->id ."/likes", array(
- "method" => "post",
- "access_token" => $token));
- $jason = json_decode($kirim);
- if ($jason == 200)
- echo "SUCCESS --> " . $data->id . " // From : " . $data->from->name . "\n";
- else
- echo "ERROR FOR ~ " . $data->id . "\n";
- sleep(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement