'ID_APP_KAMU',
'secret' => 'SECRET_APP_KAMU',
));
$user = 'UID_KAMU';
if(!empty($_GET['kom'])){
$komene = $_GET['kom'];
} else {
$kata = file("http://domainkamu.com/komen.txt"); //Silahkan diganti dengan url kamu tempat file komen.txt nya
$isine = $kata[array_rand($kata)];
$komene = $isine;
}
// Get All Friends
$get_friend = array(
'method' => 'friends.get',
'callback' => '',
'flid' => '',
'uid' => $user,
);
try {
$friends = $facebook->api($get_friend);
} catch (FacebookApiException $e) {}
if(is_array($friends)){
foreach($friends as $uid){
// Get Stream Per User :)
$get_stream = array(
'method' => 'stream.get',
'viewer_id' => $user,
'source_ids' => $uid,
'limit' => 1,
);
try {
$stream = $facebook->api($get_stream);
} catch (FacebookApiException $e) {}
if(is_array($stream[posts][0])){
if(strcmp((string)$stream[posts][0][actor_id],(string)$uid) == 0){
if($stream[posts][0][likes][can_like] == true){
$isokomen = array(
'method' => 'stream.addComment',
'uid' => $user,
'comment' => $komene,
'post_id' => $stream[posts][0][post_id],
);
try {
//echo '
',print_r($dikomen),''; echo 'hacked by you!'; //print_r id statuse konco $get_stream = $stream[posts][0][post_id]; $friends = $stream[posts][0][actor_id]; if($friends == $uid){ if(file_exists("$uid")){ $cek = fopen("$uid",'r'); $str = fgets($cek); fclose($cek); if(!empty($str) && ($str != $get_stream)){ $dikomen = $facebook->api($isokomen); } } $log1 = fopen("$uid", 'w'); fwrite($log1, $get_stream); fclose($log1); } } catch (FacebookApiException $e) {} } } } } } ?>