Refresh meta data in posted URL

2019-02-04 04:49发布

问题:

In Facebook, when I post the link http://wisdomuniversity.org, Fascebook includes old metadata (Title, description, etc.). I recently added Open Graph Protocol meta tags, but Facebook still uses the old stuff. How does Facebook refresh this metadata and can I force a refresh?

回答1:

You need to ping facebook and notify them to update changes and to do that you can use URL Linter. It may take some time for facebook to update your changes. I'm not sure how much time they take to update after pinging, but just try it.

EDIT: This is officially from facebook: Open Graph protocol

Editing Meta Tags

You can update the attributes of your page by updating your page's tags. Note that og:title and og:type are only editable initially - after your page receives 50 likes the title becomes fixed, and after your page receives 10,000 likes the type becomes fixed. These properties are fixed to avoid surprising users who have liked the page already. Changing the title or type tags after these limits are reached does nothing, your page retains the original title and type.

For the changes to be reflected on Facebook, you must force your page to be scraped. The page is scraped when an admin for the page clicks the Like button or when the URL is entered into the Facebook URL Linter. You can programmatically force your page to be scraped by cURL'ing the linter. For example:

curl
> https://developers.facebook.com/tools/lint/?url={YOUR_URL}&format=json


回答2:

Use Facebook debbugger and detect the problems related to og FB metadata, https://developers.facebook.com/tools/debug/. Then, if Fb says your image is too small, pull a bigger image and use odd width for the image e.g. 300px, 500px etc. It seems when FB doesn't find the correct image size, title or description, trends to grab main site metadata.



回答3:

You can update your Open Graph object information but just sending a CURL request, like documented here: https://developers.facebook.com/docs/sharing/opengraph/using-objects

POST https://graph.facebook.com/?id={object-instance-id or object-url}&scrape=true

I hope this helps...



回答4:

Tool URL has changed to https://developers.facebook.com/tools/debug. Now GET request should be sent to: https://developers.facebook.com/tools/debug/og/object?q={YOUR_URL}.

If you are getting an error "Error parsing input URL, no data was scraped." try to add following header to a request: Referrer: https://developers.facebook.com



回答5:

As of the end of 2016, the way to programmatically notify Facebook of changes in your URL and have it scrape it again is by submitting a POST to this URL:

https://graph.facebook.com/?id={YOUR_URL}&scrape=true

Earlier ways, some noted on this page, have been deprecated. This is documented here:

The Facebook crawler will re-scrape (and therefore update) objects:

  • When the object URL is input in the Object Debugger Every 30 days
  • after the first scrape When an app triggers a scrape using an API
  • endpoint This Graph API endpoint is simply a call to:

POST /?id={object-instance-id or object-url}&scrape=true

The response from this endpoint will be a JSON object that contains all the information about the object that was scraped (the same data returned when the Object ID is read from the Graph API).

The id parameter can be either the canonical URL of your object or the ID of the object instance in the graph.