Last active
November 17, 2018 02:56
-
-
Save nguyenphucbao68/e153bc5ce053c9d06971c800511938fe to your computer and use it in GitHub Desktop.
Kick Mem Function in Content
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
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