Follow

Set Social Post for Template

Table of Contents
  1. 1. Overview
  2. 2. Arguments
      1. 2.1.1. Example
    1. 2.2. Results
      1. 2.2.1. SUCCESS
      2. 2.2.2. FAILURE
  3. 3. Related

Overview

The Set Social Post for Template command allows you to define the content to post to each Social Network when a campaign is published.  

Arguments

The Set Social Post command requires the following arguments: Command, Realm, Password, Social Provider, Template, and Post.

api_web?r=myrealm&p=mypass&c=setsocialpostfortemplate&provider=facebook&template_id=42&post=Post%20to%20FaceBook

The command is ‘setsocialpostfortemplate’, the realm is ‘myrealm’ and the password is ‘mypass’, and the provider is 'facebook'.  The Post will be set in the Template with ID '42' and published when the template is published.

The Set Social Post command supports the following arguments:

 

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=setsocialpostfortemplate

c=setsocialpostfortemplate

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Social Provider Yes Name for the Social Provider in the realm.  Current provider strings include: facebook, twitter, linkedin provider=[social_provider_name]
Template Yes Identifier of the Template to update. template_id=[template_id]
Post Yes

Text to post to the Social Network. Each provider has the following character limit:

facebook = 398

linkedin = 118

twitter = 118

post=[text]

 

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=setsocialpostfortemplate&provider=facebook&template_id=42&post=Post%20to%20FaceBook%20from%20API

Successful results return:

SUCCESS

Results

The Set Social Post command outputs either a simple SUCCESS or a FAILURE message. 

SUCCESS

The Set Social Post command success message returns a simple string.  The result format is:

SUCCESS

FAILURE

A Set Social Post command will fail for several reasons, such as if no Social Providers exist in the realm.  The result format is:

FAILURE: [Reason]  

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk