有没有API强制Facebook再次抓页面? [英] Is there an API to force Facebook to scrape a page again?

查看:144
本文介绍了有没有API强制Facebook再次抓页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以通过在Facebook的调试工具上输入URL来强制更新页面的缓存,同时以该应用/页面的管理员身份登录:
https://developers.facebook.com/tools/debug



但是我需要的是只要有人从我们的销售部门更新我们其中一个网页的主要图片,自动调用API端点或内部应用程序的方法。不要求成千上万的销售人员以管理员身份登录,并且只要他们更新我们项目的描述或图片,就手动更新页面的缓存。



我们可以不要等待24小时让Facebook更新缓存,因为一旦我们改变它们,我们就会收到客户的每日投诉。页面元数据不是应该更改的一种事情,但您可以通过转到 Facebook的调试工具,并输入要擦除的URL



还有用于执行此操作的API,适用于任何OG对象

  curl -X POST \ 
-Fid = {object-url OR object-id}\
-Fscrape = true\
-Faccess_token = {您的访问令牌}\
https://graph.facebook.com

现在需要一个access_token。这可以是应用程序或页面access_token;不需要用户验证。


I'm aware you can force update a page's cache by entering the URL on Facebook's debugger tool while been logged in as admin for that app/page: https://developers.facebook.com/tools/debug

But what I need is a way to automatically call an API endpoint or something from our internal app whenever somebody from our Sales department updates the main image of one of our pages. It is not an option to ask thousands of sales people to login as an admin and manually update a page's cache whenever they update one of our item's description or image.

We can't afford to wait 24 hours for Facebook to update its cache because we're getting daily complaints from our clients whenever they don't see a change showing up as soon as we change it on our side.

解决方案

Page metadata isn't the sort of thing that should change very often, but you can manually clear the cache by going to Facebook's Debug Tool and entering the URL you want to scrape

There's also an API for doing this, which works for any OG object:

curl -X POST \
     -F "id={object-url OR object-id}" \
     -F "scrape=true" \
     -F "access_token={your access token}" \
     "https://graph.facebook.com"

An access_token is now required. This can be an app or page access_token; no user authentication is required.

这篇关于有没有API强制Facebook再次抓页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆