Knowledge Base

Social poster

Last Modified:
14 Dec 2018
User Level:
Power User

Description

The Social Poster Tag triggers TERMINALFOUR to post the content to the relevant social media account through the Social poster.

  • Attributes
  • Example tags
    • Twitter example
    • Facebook example
    • LinkedIn example

The link is generated from where the tag is placed, for example if the tag is in the text/html, the link will be to the section. It is recommended to place the t4 tag in the text/fulltext content layout so the link is generated to the full content.

<t4 type ="social" post_element="Tweet" account_identifier="Twitter" base_url="http://www.mywebsite.com" resource="https://api.twitter.com/1.1/statuses/update.json" post_type="post" expires="12" />

Attributes

ItemDescriptionExample
type Always set to social type ="social"
post_element Name of the element containing the text to be posted to the social networks. post_element="Tweet"
account_identifier The account associated with this content. The value in here must match the value entered when adding an account in the Social poster.  account_identifier="Twitter"
base_url The URL of the live website. Note: when the social poster task is scheduled it checks that the link exists on this domain before posting it to the social network  base_url="http://www.mywebsite.com"
resource

The URL will depend on the type of social media being used:

Facebook wall: for a user this is https://graph.facebook.com/ the username and the location of where the entry goes so if the username is terminalfour the resource is: https://graph.facebook.com/terminalfour/feed 
Facebook page: each page has a unique identifier in the URL. Go to the page to see the identifier in the URL. For example: https://www.facebook.com/pages/T44techs/321844344589231, the resource is https://graph.facebook.com/321844344589231/feed 
Twitter: the resource is: https://api.twitter.com/1.1/statuses/update.json 
LinkedIn: the most common would be a user wall, http://api.linkedin.com/v1/people/~/shares 

resource="https://api.twitter.com/1.1/statuses/update.json"
post_type Always set to post post_type="post"
expires

How long the tag stays active, in hours.

This needs to be large enough that the content post doesn't expire before content publishes. For example, if you set the site to publish every 3 hours, ensure that the "expires" attribute is larger than 3, otherwise post content may expire before it is published and sent to the Social Poster. 

expires="12"

Example tags

Twitter example

<t4 type="social" post_element="Post Text" account_identifier="Twitter" base_url="http://www.baseurl.com" resource="https://api.twitter.com/1.1/statuses/update.json" post_type="post" expires="12" />

Facebook example

<t4 type="social" post_element="Post Text" account_identifier="Facebook" base_url="http://www.baseurl.com" resource="https://graph.facebook.com/321844344589231/feed" post_type="post" expires="12" />

LinkedIn example

<t4 type="social" post_element="Post Text" account_identifier="LinkedIn" base_url="http://www.baseurl.com" resource="http://api.linkedin.com/v1/people/~/shares" post_type="post" expires="12" />