Skip to content

Instantly share code, notes, and snippets.

@minhphuc429
Forked from nguyenphucbao68/KickMemFuncContent.js
Created November 17, 2018 02:56
Show Gist options
  • Save minhphuc429/b784caf6ceef60e2827bec24b342adbc to your computer and use it in GitHub Desktop.
Save minhphuc429/b784caf6ceef60e2827bec24b342adbc to your computer and use it in GitHub Desktop.
Kick Mem Function in Content
function KickMember(idgroup, idUser, fb_dtsg) {
var Optional = {
method: "POST",
credentials: "include",
mode: 'cors',
headers:{
'Access-Control-Allow-Origin':'*'
},
headers: {
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
},
body: 'fb_dtsg='+fb_dtsg+'&confirm=true&ban_user=1'
}
var check = fetch(
"https://www.facebook.com/ajax/groups/members/remove.php?group_id=" + idgroup + "&uid=" + idUser + "&is_undo=0&source=profile_browser&dpr=1", Optional)
.then(function(res){
return res ? true : false
});
return check;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment