-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Milestone
Description
OpenGraph (Facebook)
Tutaj przykładowy obrazek: https://developer.mozilla.org/media/redesign/img/opengraph-logo.png
Obrazek widoczny jest w sieci społecznościowej jako miniatura strony.
Opis pól:
We give examples below, but the basic Open Graph tags you should implement are:
og:title – The title of your article, excluding any branding.
og:site_name - The name of your website. Not the URL, but the name. (i.e. "IMDb" not "imdb.com".)
og:url – This URL serves as the unique identifier for your post. It should match your canonical URL used for SEO, and it should not include any session variables, user identifying parameters, or counters. If you use this improperly, likes and shares will not be aggregated for this URL and will be spread across all of the variations of the URL.
og:description – A detailed description of the piece of content, usually between 2 and 4 sentences. This tag is technically optional, but can improve the rate at which links are read and shared.
og:image – This is an image associated with your media. We suggest that you use an image of at least 1200x630 pixels.
fb:app_id – The unique ID that lets Facebook know the identity of your site. This is crucial for Facebook Insights to work properly. Please see our Insights documentation to learn more.
In addition, you might consider implementing some other types to improve distribution and engagement:
og:type - Different types of media will change how your content shows up in Facebook's newsfeed. There are a number of different common object types already defined. If you don't specify a type, the default will be website. You can also specify your own types via Open Graph.
og:locale - The locale of the resource. The default is en_US. You can also use the og:locale:alternate to reflect that you have other available language translations available as well. See our Internationalization and Open Graph Internationalization pages for examples and information.
article:author - This property links to the authors of the article. The target of this can be either a Facebook Profile or a Facebook Page and Facebook will likely offer a chance to follow that author when it's displayed in the news feed. (Note that your authors should have follow enabled so that people can follow them.)
article:publisher - This property links to the publisher of the article. The target of this property must be a Facebook Page. When displayed in the News Feed, Facebook may offer the ability to like the publisher. Note that this tag is only available to media publishers.
Przykład:
<meta content="GitHub" property="og:site_name" />
<meta content="object" property="og:type" /><meta content="https://avatars0.githubusercontent.com/u/8003922?v=2&s=400" property="og:image" /><meta content="koduj/koduj.github.io" property="og:title" />
<meta content="https://github.com/koduj/koduj.github.io" property="og:url" />
<meta content="Contribute to koduj.github.io development by creating an account on GitHub." property="og:description" />Więcej informacji: https://developers.facebook.com/docs/sharing/best-practices
Twitter Card
Card to streszczenie strony orazek obrazek, które wyświetli Twitter pod link do naszej strony w krótkiej wiadomości tekstowej.
Przykład:
<meta content="@github" name="twitter:site" />
<meta content="summary" name="twitter:card" />
<meta content="koduj/koduj.github.io" name="twitter:title" />
<meta content="Contribute to koduj.github.io development by creating an account on GitHub." name="twitter:description" />
<meta content="https://avatars0.githubusercontent.com/u/8003922?v=2&s=400" name="twitter:image:src" />Więcej informacji: https://dev.twitter.com/cards/getting-started
Reactions are currently unavailable