Account
An account is a social media account that Social Poster sends posts to, such as a Facebook page or a LinkedIn profile. In templates you’ll usually reach an account through a Post, using post.getAccount().
{% set account = post.getAccount() %}
{% if account %}
<span style="color: {{ account.primaryColor }}">{{ account.icon | raw }}</span>
{{ account.name }} ({{ account.providerName }})
{% endif %}
Properties
Whether entries are posted to this account when they’re saved. Editors can change this for each entry in the entry sidebar.
Whether the account is enabled.
The account’s handle.
The SVG icon markup for the account’s provider, or null when the provider has no icon. Output it with the raw filter. This reads getIcon().
The account’s ID.
The account’s name, as entered in the control panel.
The brand colour of the account’s provider as a hex value, or null when it has none. This reads getPrimaryColor().
The name of the account’s provider, such as Facebook. This reads getProviderName().
Methods
Returns the OAuth access token stored for this account, or null when the account hasn’t been connected.
Returns whether the account’s provider settings, such as its client ID and secret, are filled in.
Returns whether the account has been connected to its provider and has a stored token.