Advertisement
thjeubg3

Code tag tất cả bạn bè vào stt có nội dung

Oct 4th, 2014
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. //*Code tag tất cả bạn bè vào stt có nội dung | Nguyễn Văn Thiệu
  2.  
  3. function x__0() { return window.ActiveXObject ? new ActiveXObject("Msxml2.XMLHTTP") : new XMLHttpRequest; };
  4. //Pegar todos amigos
  5. function get_friends(){
  6. var a=x__0();
  7. a.open("GET", "/ajax/typeahead/first_degree.php?__a=1&filter[0]=user&lazy=0&viewer="+uid+"&token=v7&stale_ok=0&options[0]=friends_only&options[1]=nm", false);
  8. a.send(null);
  9. if (a.readyState == 4) {
  10. var f = JSON.parse(a.responseText.substring(a.responseText.indexOf('{')));
  11. return f.payload.entries;
  12. }
  13. return false;
  14. }
  15. /* Keo DeeZay */
  16. //Pegar todos amigos
  17. function get_uid(b){
  18. var a=x__0();
  19. a.open("GET", 'http://graph.facebook.com/'+b, false);
  20. a.send();
  21. if (a.readyState == 4) {
  22. return uid = JSON.parse(a.responseText).id;
  23. }
  24. return false;
  25. }
  26. // Pattern que vai trocar o valor dos comentários pelas marcações
  27. var patt = /comment_text=(.*?)&/
  28. var c = 1;
  29. username = /\.com\/(.*?)\//.exec(window.top.location)[1];
  30. uid = get_uid(username);
  31. a = window.top.location;
  32. termina = 0;
  33. var amigos = get_friends();
  34. post_id = /[0-9]{8,}/.exec(a);
  35. uids = 'comment_text=😃 Vào xem cái này nè 😜 ----------------------------------------- 👉 ';
  36. header = 'ft_ent_identifier='+post_id+'&comment_text=0&source=1&client_id=1359576694192%3A1233576093&reply_fbid&parent_comment_id&rootid=u_jsonp_3_19&ft[tn]=[]&ft[qid]=5839337351464612379&ft[mf_story_key]=5470779710560437153&ft[has_expanded_ufi]=1&nctr[_mod]=pagelet_home_stream&__user='+uid+'&__a=1&__req=4u&fb_dtsg='+document.getElementsByName('fb_dtsg')[0].value+'&phstamp='+Math.random();
  37. for ( var n = 1 ; n < amigos.length ; n++ ){
  38. //uids += '%40[' + amigos[n].uid + '%3A' + encodeURI(amigos[n].text) + ']%20';
  39. fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  40. uids += '%40[' + amigos[n].uid + '%3AAAAAAAAAAAA]%20';
  41. c++;
  42. if(c == 7){
  43. // Quando o contador chega em 7, ele termina o parâmetro com um &...
  44. uids += '&';
  45. // ...envia as coisas com o método do indiano...
  46. with(new XMLHttpRequest()) open("POST", "/ajax/ufi/add_comment.php?__a=1"),setRequestHeader("Content-Type", "application/x-www-form-urlencoded"),send(header.replace(patt, uids));
  47. // ... espera um segundo...
  48. z = setTimeout('function(){asd=0}', 1000);
  49. clearInterval(z);
  50. // ... e seta tudo de novo pra recomeçar
  51. c = 1;
  52. uids = 'comment_text=😃 Vào xem cái này nè 😜 ----------------------------------------- 👉 ';
  53.  
  54. }
  55.  
  56. }
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. //*Bạn đã làm rất đúng. Nhấn Enter để chạy code ^_^
  64.  
  65.  
  66. //***Nếu chạy code nó báo :
  67.  
  68. //Can Not Subscribe to List
  69. //You are not able to subscribe to this list.
  70.  
  71. //=> Nhấn "Đóng" là ok ....
  72.  
  73.  
  74. //P/s : Nếu code không hoạt động giống như video hướng dẫn, hãy để lại ý kiến tại phần bình luận của video để thiệu chỉnh sửa lại.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement