Skip to content

Instantly share code, notes, and snippets.

@thenewlove
Last active October 26, 2018 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thenewlove/62c17e936d45bd947e55b8bf6563f3b1 to your computer and use it in GitHub Desktop.
Save thenewlove/62c17e936d45bd947e55b8bf6563f3b1 to your computer and use it in GitHub Desktop.
<?php
###########################################################
#Code bot cmt sticker Facebook
#Coder By Star Manh
#Website: Www.StarManh.Net
#Fanpage: Www.fb.com/starmanh.net
#Google+: https://plus.google.com/100812342798046924714
#Bài Viết: Www.starmanh.net/2018/10/share-code-bot-cmt-sticker-faebook.html
###########################################################
@ob_start();
function curl($url)
{
$ch = curl_init();
curl_setopt_array($ch,[
CURLOPT_URL => $url,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36',
]);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
if (isset($_REQUEST['token']))
{
$id = json_decode(curl('https://graph.fb.me/me?access_token='.$_REQUEST['token']),true);
if ($id['id'])
{
$sticker = array('488541421259303','488541141259331','1598323397147148','344394765956738','184023658881956','184003212217334','178518209293200','499671100115393');
$sticker_rd = $sticker[rand(0,count($sticker)-1)];
$feel = array('ANGRY','HAHA','LOVE','WOW','SAD');
$feel_rd = $feel[rand(0,count($feel)-1)];
$noidung = '#TT';
$stt_id = json_decode(curl('https://graph.facebook.com/me/home?fields=id&limit=3&access_token='.$_REQUEST['token']),true);
for ($i = 1 ; $i <= count($stt_id['data']) ; $i++)
{
curl('https://graph.fb.me/'.$stt_id['data'][$i-1]['id'].'/reactions?type='.$feel_rd.'&method=post&access_token='.$_REQUEST['token']);
curl('https://graph.fb.me/'.$stt_id['data'][$i-1]['id'].'/comments?message='.urlencode($noidung).'&attachment_id='.$sticker_rd.'&method=POST&access_token='.$_REQUEST['token']);
echo 'Success !';
sleep(1);
}
}else echo 'Token die !';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment