{facebook:url:type}

Description

Renders a Facebook Share button for a given page URL. The button is output as an inline iframe that embeds Facebook's official share_button.php plugin, so it works without any extra script include. Pass the URL of the page you want people to share as the first parameter - typically the public URL of the current item, e.g. _#SEO_URL_. If the URL is empty the command returns nothing. The optional second parameter selects the layout: the default is a compact icon-only button (77x20 px); pass +share to get the wider button_count layout (110x20 px) that shows a running share-count badge next to the button. Because the button is rendered live from Facebook, its exact appearance and the share count depend on Facebook at view time.

Parameters

url required

URL of the page to share. Usually the public URL of the current item; the SEO-URL alias is the typical source. If empty, the command outputs nothing.

type optional default (empty - icon-only button)

Optional layout selector. Leave empty (the default) for a compact icon-only Share button. Pass +share for the wider button_count layout that shows a running share-count badge. Any other value behaves like the default.

Examples

virtual{facebook:https://example.org/article}
Expected<iframe src="https://www.facebook.com/plugins/share_button.php?href=https%3A%2F%2Fexample.org%2Farticle&amp;width=77&amp;height=20" width="77" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>
Actual
The basic form: pass the URL to share and AA outputs an inline iframe that embeds Facebooks Share button. The default layout is a compact icon-only button, 77x20 px. (Illustrative: the output is live HTML markup, so it is not asserted as a text test.)
test[{facebook:}]
Expected[]
Actual[]
If the URL is empty the command returns an empty string - nothing is rendered. The brackets here just make the empty result visible.
virtual{facebook:https://example.org/article:+share}
Expected<iframe src="https://www.facebook.com/plugins/share_button.php?href=https%3A%2F%2Fexample.org%2Farticle&amp;width=110&amp;height=20&amp;layout=button_count" width="110" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>
Actual
Pass +share as the second parameter to switch to the button_count layout: a wider button (110x20 px) with a live share-count badge next to it. (Illustrative: live HTML markup, not asserted.)
virtual{facebook:https://example.org/article:button}
Expected<iframe src="https://www.facebook.com/plugins/share_button.php?href=https%3A%2F%2Fexample.org%2Farticle&amp;width=77&amp;height=20" width="77" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>
Actual
Only +share is a recognised layout. Any other value for the second parameter (here button) is ignored and you get the default icon-only button, identical to passing no layout at all. (Illustrative: live HTML markup, not asserted.)