Sabtu, April 27, 2013

Membuat twitter Client



post pertama di tahun 2013 --" lama juga vakumnya, hampir satu tahun...

well... gue mau share tips buat bikin twitter Client sendiri. menggunakan Source Codenya Dabr. jadi, bisa ganti via twitter getoh.

langsung ajah. preparationnya dibahas dibawah.

1. Buat website dulu.
Boleh yang gratis atau yang berbayar. untuk kondisi ini gue make yang free (maklum pelajar). bisa didapet disini. Pas daftar pilih aja subdomain, kalo yang domain di gue error mulu (FF kali yak) *sori no SS*

2. Daptarin aplikasinya.
Masuk ke sini . Masup pake twitter account yang udah dibuat sebelumnya. terus klik 
isi semua yang diperlukan, Callback URLnya isi aja http://situsyangdibuattadi.blabla/dablr
Kalo udah, masup ke tab Setting. terus liat SS. ganti iconnya opsional.
check juga di "Allow this application to be used to Sign in with Twitter"
terus klik
jangan di close dulu tabnya.


3. Import Website
Download dulu file Source Codenya disini
Masup ke Kontrol Panel > Website > Import Website
terus upload file Dabrnya (ekstensinya .zip).
Tunggu sampe ada notifikasi bahwa uploadnya kelar.

4. Setting Websitenya
Masup ke File Manager 3 yang ada di sebelah kiri halaman.
Terus klik masuk file manager. masukin password yang dipake buat bikin situsnya.
Masup ke direktori public_html. Kalo ada file default.php dihapus aja. rename config.sample.php jadi config.php.
Edit config.php nya. terus, catet di aer kode Consumer Key ama Consumer Scret yang ada di dev.twitter tadi.
masupin di

// OAuth consumer and secret keys. Available from http://twitter.com/oauth_clients
define('OAUTH_CONSUMER_KEY', 'ConsumerKey');
define('OAUTH_CONSUMER_SECRET', 'ConsumerScret');

kalo udah, save. (yang gambarnya disket). terus back (yang gambarnya panah kiri)
terus, download file (thanks to riyaldy.heck.in) .htaccess 
filenya berupa .zip. hapus .htaccess yang ori, upload htaccess.zip yang diatas. terus rename jadi .htaccess

terus masup ke direktori common. edit file user.phpnya. ctrl + a terus tiban sama user.php yang ini (thanks to xeroncyber.blogspot.com) 

5. Last Step
Masuk ke aplikasinya di dev.twitter. terus klik Create my access token.



Done.

dari berbagai sumber dan beberapa perubahan.