Woke deh pemanasan dulu….
Sebelumnya saya minta maaf kepada temen² yg tidak suka dengan hadirnya bot Like This (*Bot disini bukan dan tidak sama dengan Aplikasi Jempol Bomber yg sangat menyebalkan itu lho..wkwkwkwk).
Bot disini adalah kependekan dari robot yaitu robot yang bekerja otomatis untuk melakukan perintah tuannya.
( *Yang dimaksud disini adalah bot auto Like This,yang kita perintah untuk menyukai setiap status terbaru teman Facebook kita.)
Oke, mari kita persiapkan bahan² nya :
- Applikasi Facebook ,ambil API key + API Secret nya.(API Key beda
dengan API ID,agak ribet memang untuk melihat api key Facebook ini
sekarang
) API key + Secret ini nantinya akan menggantikan tugas kita online dan
melakukan aktifitas di Facebook tanpa perlu login. *Asal kita memberi
otoritas kepada aplikasi tersebut.
- PHP SDK Facebook versi lama Download saja disini.
- Hosting support php + cronjob
(semacam timer yang nanti melaksanakan perintah kita sesuai waktu yg
ditentukan.) Bisa pake Free hosting seperti 000webhost.com atau
youhosting.com (* yang laen belum nyoba support apa tidak ^__^ )
- Get the code and feel the soul (* Indonesian Coder Beud wakakakak….)
Code jempoler.php
003 | class agendosa extends Exception { } |
005 | require_once '/direktori/tempat/upload/sdk/facebook.php' ; |
007 | $appapikey = 'API KEY MU' ; |
009 | $appsecret = 'API SECRETMU' ; |
011 | $facebook = new Facebook( $appapikey , $appsecret ); |
013 | function komentar( $postid , $komentare , $uids ){ |
015 | if ( file_exists ( "$uids" )){ |
017 | $cek = fopen ( "$uids" , 'r' ); |
023 | if (! empty ( $str ) && ( $str != $post_id )){ |
025 | if ( $pot [posts][0][comments][can_post] == 1){ |
027 | $comment = $facebook ->api_client->stream_addComment( $postid , $komentare , "UID-FB-MU" ); |
035 | $log1 = fopen ( "$uids" , 'w' ); |
037 | fwrite( $log1 , $postid ); |
043 | $cek_permisi = $facebook ->api_client->users_hasAppPermission( "read_stream" , 'UID-FB-MU' ); |
047 | $friends = $facebook ->api_client->friends_get(null, 'UID-FB-MU' ); |
049 | array_push ( $friends , 'UID-FB-MU' ); |
051 | foreach ( $friends as $uid ) |
057 | $pot = $facebook ->api_client->stream_get( 'UID-FB-MU' , "$uid" , '' , '' ,1, '' , '' , '' , '' ); |
063 | if ( $pot [posts][0][actor_id]){ |
065 | if ( $uid == 'UID-FB-MU' ){ |
067 | if ( $pot [posts][0][likes]){ |
069 | if ( $pot [posts][0][likes][can_like] == 1){ |
071 | $like = $facebook ->api_client->stream_addLike( $pot [posts][0][post_id], 'UID-FB-MU' ); |
079 | if ( $pot [posts][0][actor_id] == $uid ){ |
081 | if (preg_match( "/suka/i" , $pot [posts][0][message]) or preg_match( "/ suka /i" , $pot [posts][0][message])){ |
083 | komentar( $pot [posts][0][post_id], "like..this.." , "$uid" ); |
091 | if ( $pot [posts][0][likes]){ |
093 | if ( $pot [posts][0][likes][can_like] == 1){ |
095 | $like = $facebook ->api_client->stream_addLike( $pot [posts][0][post_id], 'UID-FB-MU' ); |
Setelah semua bahan terkumpul,
upload php sdk + source code tsb ke hostinganmu .
Edit code botnya nya pada bagian :
1 | require_once '/direktori/tempat/upload/sdk/facebook.php' ; |
3 | $appapikey = 'API KEY MU' ; |
5 | $appsecret = 'API SECRETMU' ; |
/direktori/tempat/upload/sdk/facebook.php >> ganti direktori
tempat upload sesuai hosting masing² *view lokasi php sdk melalui file
manager biar lebih mudah.
API KEY MU dan API SECRETMU= ganti dengan aplikasi milikmu sendiri.
Ganti juga
UID-FB-MU dengan uid FB mu, dapat dilihat melalui
http://graph.facebook.com/username
Kalo’ kamu belum punya API key + secret silakan memakai API key + secret dibawah ini :
1 | $appapikey = 'a8be3e413467033ecbadfb9b7603df3a' ; |
3 | $appsecret = 'cefcccd8d8c0b2257308e2c306dce6c0' ; |
lalu join Apps disini :
Agen Dosa Facebook Lab Khusus yg belum punya API key + Secret saja
yang sudah punya API key + secret tinggal tambahin :
read_stream,publish_stream,sama offline_access
Selanjutnya,
Lihat contoh disini :
Saya memakai 000webhost untung test hostingnya,
*kalo gak mau nunggu silakan ke www.youhosting.com

Setelah terupload lalu rubah permisi (chmod) direktori bot termasuk subfolder di dalamnya ke 777 .

seperti ini :

Pastikan semua sudah terupload dan kode sudah benar, mari kita test bot melalui direct link

misal file tadi kita kasih nama jempoler.php dan di upload di
bot.vio.gov.my maka > http://bot.vio.gov.my/jempoler.php , jika
loading lama berarti si bot sedang melakukan aksinya, tinggal cek di
beranda apakah status teman kamu sudah ada yang kamu jempoli tanpa
sadar? selamat…tinggal setting cron / timernya biar kita nggak susah2
pencet directlink tiap mow eksekusi bot nya

.
masih di panel 000webhost lihat disini :

Beres deh
0 komentar: