| 25 | }; |
| 26 | |
| 27 | const getSaved = async (uid, fb_dtsg, cursor = "") => { |
| 28 | if (cursor) cursor = `"cursor":"${cursor}",`; |
| 29 | cursor = encodeURIComponent( |
| 30 | `{"content_filter":null,"count":10,${cursor}"scale":1}` |
| 31 | ); |
| 32 | const res = await fetch("https://www.facebook.com/api/graphql/", { |
| 33 | body: `av: 100000034778747&__user=${uid}&__dyn=&fb_dtsg=${fb_dtsg}&fb_api_req_friendly_name=CometSaveDashboardAllItemsPaginationQuery&variables=${cursor}&server_timestamps=true&doc_id=3196659713724388`, |
| 34 | method: "POST", |
| 35 | mode: "cors", |
| 36 | credentials: "include", |
| 37 | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| 38 | }); |
| 39 | return await res.json(); |
| 40 | }; |
| 41 | |
| 42 | const getAllSaved = async (uid, fb_dtsg, cursor) => { |
| 43 | uid = encodeURIComponent(uid); |