如何检测喜欢分享的facebook页面是否成功伪造了

时间:2019-06-19 04:47:54

标签: puppeteer

我有一个问题,如果fb页面已经被喜欢或不使用伪造者,我将无法获得

app.get("/process", async (req, res) => {
  const page = await browser.newPage();

  let input = req.query.uri; //"the url which i need to like";

  let params = {
    href: input,
    ret: "sentry",
    act: "connect"
  };
  let uri =
    "https://www.facebook.com/plugins/error/confirm/like?iframe_referer=&kid_directed_site=false&secure=true&plugin=like&return_params=" +
    encodeURIComponent(JSON.stringify(params));
  await page.goto(uri, { waitUntil: "domcontentloaded" });
  await page.waitFor(1000);
  const fbBtn = await page.$("button[name=__CONFIRM__]");
  await fbBtn.click();
  console.log("Like: Done");
});
app.listen(port, () => console.log(`Example app listening on port ${port}!`));

0 个答案:

没有答案