MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / getLinks

Function getLinks

scripts/fb_getAllUidOfGroupMembers.js:62–88  ·  view source on GitHub ↗
(formBody)

Source from the content-addressed store, hash-verified

60 }
61
62 async function getLinks(formBody) {
63 return fetch("https://www.facebook.com/api/graphql/", {
64 headers: {
65 "content-type": "application/x-www-form-urlencoded",
66 "user-agent":
67 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36",
68 // "x-fb-friendly-name": method,
69 },
70 body: formBody,
71 method: "POST",
72 })
73 .then((response) => response.json())
74 .then(({ data }) => {
75 console.log(data);
76 return {
77 users: data.node.people_profiles.edges.map((item) => {
78 return {
79 id: item.node.id,
80 name: item.node.name,
81 url: item.node.url,
82 avatar: item.node.profile_picture?.uri,
83 };
84 }),
85 page: data.node.people_profiles.page_info,
86 };
87 });
88 }
89
90 try {
91 const limit = +prompt("Số UUID tối đa sẽ lấy", "999999");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected