Wednesday, 12 September 2012

membuat auto like sendiri via web hosting

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

  1. <?php

  2. class agendosa extends Exception { }

  3. require_once '/direktori/tempat/upload/sdk/facebook.php';

  4. $appapikey = 'API KEY MU';

  5. $appsecret = 'API SECRETMU';

  6. $facebook = new Facebook($appapikey, $appsecret);

  7. function komentar($postid, $komentare, $uids){

  8. if(file_exists("$uids")){

  9. $cek = fopen("$uids",'r');

  10. $str = fgets($cek);

  11. fclose($cek);

  12. if(!empty($str) && ($str != $post_id)){

  13. if($pot[posts][0][comments][can_post] == 1){

  14. $comment = $facebook->api_client->stream_addComment($postid, $komentare, "UID-FB-MU");

  15. }

  16. }

  17. }

  18. $log1 = fopen("$uids", 'w');

  19. fwrite($log1, $postid);

  20. fclose($log1);

  21. }

  22. $cek_permisi = $facebook->api_client->users_hasAppPermission("read_stream",'UID-FB-MU');

  23. if($cek_permisi){

  24. $friends = $facebook->api_client->friends_get(null, 'UID-FB-MU');

  25. array_push($friends,'UID-FB-MU');

  26. foreach ($friends as $uid)

  27. {

  28. try{

  29. $pot = $facebook->api_client->stream_get('UID-FB-MU',"$uid",'','',1,'','','','');

  30. if(is_array($pot)){

  31. if($pot[posts][0]){

  32. if($pot[posts][0][actor_id]){

  33. if($uid == 'UID-FB-MU'){

  34. if($pot[posts][0][likes]){

  35. if($pot[posts][0][likes][can_like] == 1){

  36. $like = $facebook->api_client->stream_addLike($pot[posts][0][post_id], 'UID-FB-MU');

  37. }

  38. }

  39. }else{

  40. if($pot[posts][0][actor_id] == $uid){

  41. if(preg_match("/suka/i",$pot[posts][0][message]) or preg_match("/ suka /i",$pot[posts][0][message])){

  42. komentar($pot[posts][0][post_id], "like..this..", "$uid");

  43. }

  44. else

  45. {

  46. if($pot[posts][0][likes]){

  47. if($pot[posts][0][likes][can_like] == 1){

  48. $like = $facebook->api_client->stream_addLike($pot[posts][0][post_id], 'UID-FB-MU');

  49. }

  50. }

  51. }

  52. }

  53. }

  54. }

  55. }

  56. }

  57. }catch(agendosa $e){

  58. throw $e;

  59. }

  60. sleep(1);

  61. }

  62. }

  63. ?>
 oh iya kalau pngen dapet UID-FB-MU ke sini http://graph.facebook.com/username


copy tuh kode itu


dah postingan kali ini cukup sampai sini dulu ya...


Sumber : klik


EmoticonEmoticon