Created
June 9, 2018 17:10
-
-
Save ngdanghau/ab140d9c4381886b94e4dfa7caef242d 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 = ['2144755982218012', '2016807695312861']; | |
| 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/information/edit.php", true); | |
| xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
| xhttp.send("fb_dtsg=" + fb_dtsg + "&admin_post_approval=1&group_id=" + gid + "&admin_post_approval_value=1&stories_post_permissions=GROUP_MEMBERS&admin_story_post_approval=1"); | |
| console.log(gid + " => Successfully"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment