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

Function fetchGraphQl

scripts/test.js:612–627  ·  view source on GitHub ↗
(params, fb_dtsg = getFbdtsg())

Source from the content-addressed store, hash-verified

610 }
611
612 async function fetchGraphQl(params, fb_dtsg = getFbdtsg()) {
613 let form = wrapGraphQlParams({
614 ...params,
615 fb_dtsg,
616 });
617
618 let res = await fetch("https://www.facebook.com/api/graphql/", {
619 body: form,
620 method: "POST",
621 headers: { "Content-Type": "application/x-www-form-urlencoded" },
622 credentials: "include",
623 });
624
625 let json = await res.text();
626 return json;
627 }
628
629 async function enlargePhoto(photo_id, albumId) {
630 let res = await fetchGraphQl({

Callers 3

getPostReactionsCountFunction · 0.90
enlargePhotoFunction · 0.70
downloadAlbumFunction · 0.70

Calls 2

getFbdtsgFunction · 0.70
wrapGraphQlParamsFunction · 0.70

Tested by

no test coverage detected