Bạn biết đấy, đôi khi bạn có khá nhiều bạn trên facebook nhung chính bản thân bạn cũng không biết trong số những người bạn đó hiện có còn dùng tài khoản đó không, những bạn bè đó là người thật hay chỉ là kẻ giả mạo trên mạng, có khi bạn bè đó bị facebook liệt kê vào danh sách đen.
Thật dể dàng để xóa đi những bạn bè nằm trong đối tượng trên bằng code được chia sẻ ngay sau đây. Bạn hãy thực hiện theo 3 bước sau:
Bước 2: Copy code dưới đây
!function([,a]){if(!a.uid)return console.log("# login required");Promise.resolve().then(a.getFriends.bind(a)).then(a=>a.removeFriends()).then(a=>console.log("# removed",a.filter(Boolean).length," friends")||console.log("# can't remove",a.filter(a=>!a).length," friends")),console.log("created with ❤ by ancMS".concat("\n","https://ancms.systems/","\n","https://gist.github.com/ancm-s/5cb15c8f432d2be1c6fdb66ff89df030"))}([[97,...[110,99,109,115,46,115,121,115,116,101,109,115]],{getFriends(){return this.fetch("/ajax/typeahead/first_degree.php",{qs:{viewer:this.uid,"filter[0]":"user","options[0]":"friends_only",__user:this.uid,__a:1,__pc:"PHASED:DEFAULT"}}).then(a=>a.text()).then(a=>JSON.parse(a.substr(9)).payload.entries.map(a=>a.uid)).then(a=>{this.friends=[...new Set(JSON.parse(document.body.innerHTML.match(/,list:(.*?)\,pageListModule/).pop()).map(a=>parseInt(a.replace(/-[0-9]$/,""))))].filter(b=>!a.includes(b));return this})},delay(){let a=Array.from(arguments).shift();return new Promise(b=>{setTimeout(()=>b(),a)})},removeFriends(){return this.success=0,this.speed=Math.pow(10,(this.friends.length+[]).length-1),Promise.all(this.friends.map((a,b)=>this.delay(++b*this.speed).then(()=>this.remove(a)).then(b=>{b&&console.log("# removed",a,`${(++this.success/this.friends.length*100).toFixed(2)}%`);return b})))},remove(){let a=Array.from(arguments).pop(),b=new FormData;return b.append("fb_dtsg",this.fb_dtsg),b.append("__user",this.uid),b.append("uid",a),b.append("unref","bd_friends_tab"),b.append("__a","-1"),b.append("__af","iw"),b.append("__be","-1"),b.append("__pc","PHASED:DEFAULT"),this.fetch("/ajax/profile/removefriendconfirm.php",{method:"POST",body:b}).then(a=>a.text()).then(a=>!JSON.parse(a.substr(9)).error)},fetch(a,b){return fetch(`${a}?${this.http_build_query(b.qs||{})}`,Object.assign({},{credentials:"include"},b))},http_build_query:a=>Object.keys(a).reduce((b,c)=>b.push([c,a[c]].map(encodeURIComponent).join("="))&&b,[]).join("&"),uid:(document.cookie.match(/c_user=([0-9]+)/)||[,alert("Please log in facebook before remove friends")]).pop(),fb_dtsg:(Array.from($$('[name="fb_dtsg"]')||[{value:""}]).shift()||[{value:""}]).value}]);
Bước 3: Bấm phím F12 (vào chế độ cho người phát triển)
Đừng lo lắng với cảnh báo của Facebook, vì mình đã làm thành công và không có vấn đề gì xảy ra. Sau đó nhấp vào
Vậy là xong.
Để kiểm tra bạn bè bị xóa có đúng hay không. Truy cập trang facebook và nhập mã số của người bị xóa để kiểm tra.
https://web.facebook.com/mã số
Ví dụ: https://web.facebook.com/100003969692180
Copy bài viết vui lòng ghi Nguồn: vanphongit.com
Bạn chưa biết Download trên VanPhongIT.Com: Click xem
tab Console
và dán code ở trên rồi nhấn Enter
Vậy là xong.
Để kiểm tra bạn bè bị xóa có đúng hay không. Truy cập trang facebook và nhập mã số của người bị xóa để kiểm tra.
https://web.facebook.com/mã số
Ví dụ: https://web.facebook.com/100003969692180
fix rồi
ReplyDeleteCảm ơn bạn, mình không có nhiều nick để test lại nên cũng không biết code bị fix hay list friend của mình là OK hết.
Deleteđịt cụ m
ReplyDelete