Share Code Bot Cảm Xúc 'Biết Ơn' Facebook

Hướng dẫn: Tạo 1 file botcamxuc.php
Cron File và thay token vào :)
Code:

<?php
$token = 'token full quyền';
$limitnf=5; // 5 Status  NewFeed 1 Lần
$puaru=json_decode(puaru('https://graph.facebook.com/me/home?fields=id,message,created_time,from,comments,type&access_token='.$token.'&offset=0&limit='.$limitnf.''),true);
for($i=1;$i<=count($puaru[data]);$i++)
{
        set_time_limit(0);
        $camxuc= array('THANKFUL');
        $mess=$camxuc[rand(0,count($camxuc)-1)];
echo puaru('https://graph.facebook.com/'.$puaru[data][$i-1][id].'/reactions?type='.$mess.'&method=post&access_token='.$token.'');
} 
function puaru($url)
{
      $data = curl_init();
      curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($data, CURLOPT_URL, $url);
      $hasil = curl_exec($data);
      curl_close($data);
  return $hasil;
}
?>
- Trong quá trình viết bài chúng tôi sẽ có nhiều thiếu sót mong các bạn đóng góp để chúng tôi rút kinh nghiệm hơn !
- Mọi chi tiết xin liên hệ:
• Email: nhanchanhkun@gmail.com
• Facebook: Fb.com/nck99
Xin chân thành cảm ơn những đóng góp của bạn để chúng tôi ngày càng phát triển hơn nữa...

● Hãy là con người văn minh từ những câu nói

Không có nhận xét nào