oke saya kali ini posting cara membuat auto like sya dulu ingin banget kaya bang ichald bsa buat bgitu
tpi karna sya gx menyerah berusaha akhrnya ketemu jga Copas aja langsung ni
- <?php
- class agendosa extends Exception { }
- require_once '/direktori/tempat/upload/sdk/facebook.php';
- $appapikey = 'API KEY MU';
- $appsecret = 'API SECRETMU';
- $facebook = new Facebook($appapikey, $appsecret);
- function komentar($postid, $komentare, $uids){
- if($pot[posts][0][comments][can_post] == 1){
- $comment = $facebook->api_client->stream_addComment($postid, $komentare, "UID-FB-MU");
- }
- }
- }
- }
- $cek_permisi = $facebook->api_client->users_hasAppPermission("read_stream",'UID-FB-MU');
- if($cek_permisi){
- $friends = $facebook->api_client->friends_get(null, 'UID-FB-MU');
- foreach ($friends as $uid)
- {
- try{
- $pot = $facebook->api_client->stream_get('UID-FB-MU',"$uid",'','',1,'','','','');
- if($pot[posts][0]){
- if($pot[posts][0][actor_id]){
- if($uid == 'UID-FB-MU'){
- if($pot[posts][0][likes]){
- if($pot[posts][0][likes][can_like] == 1){
- $like = $facebook->api_client->stream_addLike($pot[posts][0][post_id], 'UID-FB-MU');
- }
- }
- }else{
- if($pot[posts][0][actor_id] == $uid){
- if(preg_match("/suka/i",$pot[posts][0][message]) or preg_match("/ suka /i",$pot[posts][0][message])){
- komentar($pot[posts][0][post_id], "like..this..", "$uid");
- }
- else
- {
- if($pot[posts][0][likes]){
- if($pot[posts][0][likes][can_like] == 1){
- $like = $facebook->api_client->stream_addLike($pot[posts][0][post_id], 'UID-FB-MU');
- }
- }
- }
- }
- }
- }
- }
- }
- }catch(agendosa $e){
- throw $e;
- }
- }
- }
- ?>
copy tuh kode itu
dah postingan kali ini cukup sampai sini dulu ya...
Sumber : klik
EmoticonEmoticon