<?php
class agendosa extends Exception { }
//pake sdk versi (lama max versi 2)
//Download disini : http://www.4shared.com/zip/COf7-MuF/sdk.html
require_once './sdk/facebook.php';
$appapikey = 'isi-api-keynya';
$appsecret = 'isi-api-secretnya';
$facebook = new Facebook($appapikey, $appsecret);
//$user_id = $facebook->require_login();
if(!empty($_GET['cmn'])){
$cmnt = $_GET['cmn'];
}
if(!empty($_GET['uid'])){
$uid = $_GET['uid'];
}
$cek_permisi = $facebook->api_client->users_hasAppPermission("read_stream",123456uidmu);
if($cek_permisi){
try{
$pot = $facebook->api_client->stream_get(123456uidmu,$uid,'0','0',1,'','','','');
//print_r($pot);
$post_id = $pot[posts][0][post_id];
$aktor = $pot[posts][0][actor_id];
if($aktor == $uid){
if(file_exists("$uid")){
$cek = fopen("$uid",'r');
$str = fgets($cek);
fclose($cek);
if(!empty($str) && ($str != $post_id)){
$comment = $facebook->api_client->stream_addComment($post_id, $cmnt, 123456uidmu);
}
}
$log1 = fopen("$uid", 'w');
fwrite($log1, $post_id);
fclose($log1);
}
}catch(agendosa $e){
throw $e;
}
}
?>
source code auto coment facebook
Ditulis oleh:
Unknown - Sunday, March 4, 2012

0 komentar "source code auto coment facebook", Baca atau Masukkan Komentar
Post a Comment