jerdev38282 commited on
Commit
ac1d593
·
verified ·
1 Parent(s): 9256281

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +4 -5
index.js CHANGED
@@ -8,9 +8,8 @@ const WEBSOCKET_URL = "wss://gagstock.gleeze.com";
8
  const FALLBACK_SECOND_URL = "https://gagstock.gleeze.com/choose-scraper/second";
9
  const ARIA_FETCH_URL = "https://kaiz-apis.gleeze.com/api/aria?ask=hi&uid=1&apikey=20f3d256-cb34-4c8b-991f-710f28fdf230";
10
 
11
- // ⚠️ Insert your Facebook Page Access Token and Page ID here
12
- const PAGE_ACCESS_TOKEN = "EACNZBW6MP6FkBOwHARvCANlYC1B8Kk3b0PAZCGZCCRchLlVE2FaOO1DUqWZAWJFh3wOUepHVSVxG1ndJEeJkUcdRIPK73PZBk9jTx2NzqLbHCYJnFH3ieh4ZBLUIhKGddnHWqQ92TrH5cBatn1VNlLYkaZAFoIZCz43ZB8YUslk7Ywb8ZB3c4i3gg5ZBAvjzQEZAnNxqC0J6jViGAAZDZD";
13
- const PAGE_ID = "184093694784828";
14
 
15
  let ws = null;
16
  let pingInterval = null;
@@ -33,7 +32,7 @@ async function deleteAllPosts() {
33
  console.log("[DELETE] Starting auto-delete for all posts...");
34
 
35
  try {
36
- let nextPage = `https://graph.facebook.com/${PAGE_ID}/posts?access_token=${PAGE_ACCESS_TOKEN}&limit=100`;
37
 
38
  while (nextPage) {
39
  const res = await axios.get(nextPage);
@@ -43,7 +42,7 @@ async function deleteAllPosts() {
43
 
44
  for (let post of posts) {
45
  try {
46
- await axios.delete(`https://graph.facebook.com/${post.id}?access_token=${PAGE_ACCESS_TOKEN}`);
47
  deletedCount++;
48
  console.log(`[DELETE] Deleted post ID: ${post.id} (Total deleted: ${deletedCount})`);
49
  } catch (err) {
 
8
  const FALLBACK_SECOND_URL = "https://gagstock.gleeze.com/choose-scraper/second";
9
  const ARIA_FETCH_URL = "https://kaiz-apis.gleeze.com/api/aria?ask=hi&uid=1&apikey=20f3d256-cb34-4c8b-991f-710f28fdf230";
10
 
11
+ // ⚠️ Insert your Facebook Page Access Token here
12
+ const PAGE_ACCESS_TOKEN = "YOUR_PAGE_ACCESS_TOKEN";
 
13
 
14
  let ws = null;
15
  let pingInterval = null;
 
32
  console.log("[DELETE] Starting auto-delete for all posts...");
33
 
34
  try {
35
+ let nextPage = `https://graph.facebook.com/v17.0/me/posts?access_token=${PAGE_ACCESS_TOKEN}&limit=100`;
36
 
37
  while (nextPage) {
38
  const res = await axios.get(nextPage);
 
42
 
43
  for (let post of posts) {
44
  try {
45
+ await axios.delete(`https://graph.facebook.com/v17.0/${post.id}?access_token=${PAGE_ACCESS_TOKEN}`);
46
  deletedCount++;
47
  console.log(`[DELETE] Deleted post ID: ${post.id} (Total deleted: ${deletedCount})`);
48
  } catch (err) {