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

Function fetchGraphQl

scripts/fb_videoDownloader.js:83–96  ·  view source on GitHub ↗
(doc_id, variables)

Source from the content-addressed store, hash-verified

81 // Cần thêm rule trong rule.jsons để hàm này có thể chạy trong extension context
82 getLinkFbVideo1: async function (videoId, dtsg) {
83 function fetchGraphQl(doc_id, variables) {
84 return fetch("https://www.facebook.com/api/graphql/", {
85 method: "POST",
86 headers: {
87 "content-type": "application/x-www-form-urlencoded",
88 },
89 body: shared.stringifyVariables({
90 doc_id: doc_id,
91 variables: JSON.stringify(variables),
92 fb_dtsg: dtsg,
93 server_timestamps: !0,
94 }),
95 });
96 }
97
98 let res = await fetchGraphQl("5279476072161634", {
99 UFI2CommentsProvider_commentsKey: "CometTahoeSidePaneQuery",

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected