Extension:OpenGraphMeta/ru
OpenGraphMeta Статус релиза: бета |
|
---|---|
Реализация | Извлечение данных, Функция парсера |
Описание | Обеспечивает метатеги OpenGraph, предоставляя данные для извлечения третьими сторонами, такими как Facebook |
Автор(ы) | Daniel Friesen (Dantmantalk) |
Последняя версия | 0.5.6 |
Политика совместимости | Master maintains backward compatibility. |
MediaWiki | 1.39+ |
Изменения в БД | Нет |
Лицензия | Лицензия не указана |
Скачать | |
Ежеквартальные загрузки | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Использование общедоступными вики | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Переведите расширение OpenGraphMeta, если оно доступно на translatewiki.net | |
Проблемы | Открытые задачи · Сообщить об ошибке |
Расширение OpenGraphMeta предоставляет метаданные протокола OpenGraph для статей в вики для извлечения сторонними организациями, такими как Facebook.
The primary use for this extension is for any wiki that provides its users a button to "Like" pages on the wiki, especially if the wiki uses a custom default skin.
As sometimes Facebook can extract undesirable parts from the page (known on some custom skins to potentially extract random images irrelevant to the content) providing this data gives Facebook clean data to display in likes, and cleans up the long title into a pair of clean site and page titles.
A parser function {{#setmainimage:Filename.ext}}
which also exports what it is passed so you can use it easily in a [[File:{{#setmainimage:Filename.ext}}|thumb|right|...]]
format can be used to set the image in the article which you prefer Facebook to use when displaying information about the page on your wiki (hint: This works very nicely when you incorporate it into an infobox template making the infobox image the preferred image for 3rd parties to use).
This extension can also be paired with Расширение:Description2 which extracts description information from articles, when both are installed OpenGraphMeta will make use of the information Description2 extracts.
We need to provide the ability to maximize the amount of information available of the shared content so that it is more descriptive, while still in compliance with our policy.
Установка
- <translate> [[<tvar name=2>Special:ExtensionDistributor/OpenGraphMeta/ru</tvar>|Download]] and move the extracted <tvar name=name>
OpenGraphMeta/ru
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenGraphMeta%2Fru - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'OpenGraphMeta/ru' );
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Configuration
In order to use Facebook Insights you must add the app ID to your page. Insights lets you view analytics for traffic to your site from Facebook. Find the app ID in your App Dashboard.[1]
$egFacebookAppId = 'YOUR_FACEBOOK_APP_ID_HERE'; // Optional
$egFacebookAdmins = 'FACEBOOK_ADMINS'; // Optional
The site name exposed in OpenGraphMeta metadata can be adjusted with the Opengraphmeta-site-name
system message, if editing $wgSitename is undesired.
См. также
- Расширение:Description2 – Provides page description information. When installed OpenGraphMeta will use the information it extracts from articles.
- Extension:Semantic Meta Tags – Provides HTML
<meta>
tags generated from semantic annotations including OpenGraph tags. - Расширение:TextExtracts – Provides an API to retrieve plain-text or limited HTML extracts of page content.
- Расширение:PageImages – Automatically chooses the best image for the page.
- https://developers.facebook.com/tools/debug – Simple tool that enables preview of what Facebook will display based on Open Graph meta tags.
- pageterms API query module – Provides an API to retrieve the Wikidata description of any page.
- Another very simple OpenGraph extension based on Расширение:TextExtracts .
References
File:OOjs UI icon information-progressive.svg | <translate> This extension is included in the following wiki farms/hosts and/or packages:</translate>
<translate> This is not an authoritative list.</translate> <translate> Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here.</translate> <translate> Always check with your wiki farms/hosts or bundle to confirm.</translate> |
- Pages with script errors
- Pages with broken file links
- Beta status extensions/ru
- Data extraction extensions/ru
- Parser function extensions/ru
- Extensions with manual MediaWiki version
- Extensions with no license specified/ru
- Extensions in Wikimedia version control/ru
- All extensions/ru
- Extensions not in ExtensionJson
- HTML head extensions/ru
- Search engine optimization extensions/ru