Created
June 9, 2018 17:03
-
-
Save ngdanghau/ddb59ca8afa80e2bcb5ee7dfdbf6f4af to your computer and use it in GitHub Desktop.
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 characters
| 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"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment