且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用JQuery更改Facebook元标记内容属性

更新时间:2023-12-05 20:57:40

绝对有可能使用jQuery更改元标记,但我不认为这将完成你想要的元标签由FB刮刀拉出。 FB刮刀出来并刮擦您的页面以阅读元标签。

It is definitely possible to change meta tags using jQuery, but I don't think that's going to accomplish what you want since the meta tags are pulled by the FB scraper. The FB scraper goes out and scrapes your page to read the meta tags.


编辑元标签

Editing Meta Tags

您可以通过更新页面的
标签来更新页面的属性。请注意,og:title和og:type最初只能编辑
- 在您的页面收到50个喜欢的标题变得固定后,
,并且在您的页面收到10,000个类型变为固定后。
这些属性是固定的,以避免令人惊讶的用户已经喜欢
的页面。达到这些限制
之后更改标题或类型标签不会执行任何操作,您的页面保留原始标题和
类型。

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.

反映在Facebook上,您必须强制您的页面
被刮。当页面的管理员点击
喜欢按钮或网址输入到Facebook网址
Linter时,页面将被删除。您可以通过编程方式强制您的页面被
删除。例如...

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 ...

https://developers.facebook.com/docs/opengraph/