Created
June 9, 2018 17:03
-
-
Save ngdanghau/ddb59ca8afa80e2bcb5ee7dfdbf6f4af to your computer and use it in GitHub Desktop.
Revisions
-
ngdanghau created this gist
Jun 9, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ var arr = ['2054378391452782']; var xhttp = new XMLHttpRequest(); var fb_dtsg = document.getElementsByName("fb_dtsg")[0].value; arr.forEach(function(gid) { xhttp.open("POST", "https://www.facebook.com/ajax/groups/membership/leave.php", true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.send("group_id=" + gid + "&ref=group_mall&dpr=1&fb_dtsg=" + fb_dtsg + "&prevent_readd=on&confirmed=1"); console.log(gid + " => Successfully"); });