({ dtsg: fb_dtsg, groupID, cursor })
| 32 | } |
| 33 | |
| 34 | function prepareData({ dtsg: fb_dtsg, groupID, cursor }) { |
| 35 | const variables = JSON.stringify({ |
| 36 | count: 10, |
| 37 | cursor: cursor, |
| 38 | groupID: groupID, |
| 39 | membershipType: "MEMBER", |
| 40 | scale: 1, |
| 41 | search: null, |
| 42 | statusStaticFilter: null, |
| 43 | id: groupID, |
| 44 | }); |
| 45 | const data = { |
| 46 | doc_id: "7539362479514359", |
| 47 | fb_dtsg, |
| 48 | variables, |
| 49 | fb_api_caller_class: "RelayModern", |
| 50 | fb_api_req_friendly_name: |
| 51 | "GroupsCometPeopleProfilesPaginatedListPaginationQuery", |
| 52 | }; |
| 53 | const formBody = []; |
| 54 | for (const property in data) { |
| 55 | const encodedKey = encodeURIComponent(property); |
| 56 | const encodedValue = encodeURIComponent(data[property]); |
| 57 | formBody.push(encodedKey + "=" + encodedValue); |
| 58 | } |
| 59 | return formBody.join("&"); |
| 60 | } |
| 61 | |
| 62 | async function getLinks(formBody) { |
| 63 | return fetch("https://www.facebook.com/api/graphql/", { |
no outgoing calls
no test coverage detected