javascript 在Facebook上群发取消关注朋友,页面和群组

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 在Facebook上群发取消关注朋友,页面和群组相关的知识,希望对你有一定的参考价值。

// Version: 0.2
// Author: Ahmed Kamal (AhmedKamal20)
// About : To Mass Unfollow Friends, Pages & Groups
// It'll Unfollow first ~250 (or more) from selected category
// It's kinda slow, but to avoid getting blocked by Facebook
// Usage :
// Open (News Feed Preferences) from the right menu
// Choose (Unfollow people to hide their posts)
// Select between All, Friends Only, Pages Only, Groups Only
// Then open the console and paste the following

var unfollow = document.querySelector('[data-testid="unfollow"]');
var scrollable = unfollow.querySelector(".scrollable");
var posters = unfollow.querySelectorAll("._5u3n");
var done = unfollow.querySelector("._2-ks");
var i = 0;
var time = 1000;
var pages = 10;

function scroll(){
  scrollable.scrollTop = scrollable.scrollHeight;
  if ( i++ < pages ) {
    setTimeout(scroll, time*5);
  } else {
    i = 0;
    setTimeout(function(){
      posters = unfollow.querySelectorAll("._5u3n");
      console.log(posters.length);
      start();
    }, time*5);
  }
}

function start(){
  console.log(i);
  posters[i].click();
  if ( i++ < posters.length - 1 ) {
    setTimeout(start, time);
  } else {
    done.click();
    new Audio("https://freesound.org/data/previews/423/423619_2155630-lq.mp3").play();
  }
}

scroll();

以上是关于javascript 在Facebook上群发取消关注朋友,页面和群组的主要内容,如果未能解决你的问题,请参考以下文章

每隔一段时间发送群发推送通知

取消 Facebook 登录不显示 (Swift)

哦哦。用户取消了 Facebook 登录。 - 解析

在设备上运行应用程序时,iOS Facebook SDK“用户取消登录”?

取消 Google Play 游戏登录后 Facebook 登录崩溃(反之亦然)

微信公众平台开发,自定义菜单,群发消息,网页授权