This method sets the user's status in social networks that support this feature.
Note: This method is also supported in our REST API. If you wish to execute this method from your server, please refer toREST API > socialize.setStatus.
This operation is currently supported by the following providers: Facebook, Twitter, LinkedIn, Renren and QQ.
The following table lists the available parameters:
|||status||string||The text to set as the user's status.|
|||actionAttributes||JSON object||In Gamification your users receive points for actions they perform on your site, in this case setting a status grants the user points. Action Attributes may be used to annotate actions with additional information, such as the section of the web site that generated the action. If you set here the actionAttributes, each time a user sets a status, the action also receives an attribute, for example "tv-show":"glee", which can mean that the action was performed on the "Glee" page of the site. |
actionAttributes contain a JSON object comprised of a series of attribute keys (categories) with associated values. You can also use a generic "tags" key.
No more than three values can be given, they can be with a single key or each have their own key.
For more information see Variants and Action Attributes. Action attributes are later used to filter GM Plugins by a certain attribute.
A reference to a callback function. Gigya calls the specified function along with the results of the API method when the API method completes.
The callback function should be defined with the following signature: functionName(Response).
The "Response Object Data Members" table below provides specification of the data that is passed to the callback function.
A string of maximum 100 characters length. The CID sets categories for transactions that can be used later for filtering reports generated by Gigya in the "Context ID" combo box. The CID allows you to associate the report information with your own internal data. For example, to identify a specific widget or page on your site/application. You should not define more than 100 different context IDs.
A developer-created object that is passed back unchanged to the application as one of the fields in the response object.
A comma-delimited list of provider names to exclude in the method execution. This parameter gives the possibility to specify providers to which you do not want this method to apply. If you do not set this parameter, by default, no provider is disabled (i.e., the method applies to all connected providers).'facebook', 'twitter', 'linkedin', 'renren'.
For example, if you would like the method to apply to all providers except Twitter, define: disabledProviders: "twitter".
Valid provider names include:
A comma-delimited list of provider names to include in the method execution. This parameter gives the possibility to apply this method only to a subset of providers of your choice. If you do not set this parameter, by default all the providers are enabled (i.e., the method applies to all connected providers).'facebook', 'twitter', 'linkedin', 'renren'.
For example, if you would like the method to apply only to Twitter, define: enabledProviders: "twitter".
Valid provider names include:
Using this parameter you may determine whether to use Gigya's URL shortening service for URLs passed in the status parameter. The optional values for this parameter are:
To determine your data center see Finding Your Data Center.
When Gigya's URL shortening service is active, Gigya tracks all the traffic coming from the distributed URLs. In such case, 'Referred Traffic' reports will be available to you.
|||Status||string||It is possible to specify different text to set as status for each social network. For this purpose, the method supports a set of parameters with the same name format: (i.e. facebook, twitter, etc.) followed by "Status". For example: twitterStatus - specifies the text to be used specifically when publishing to Twitter.|
Each of these optional parameters if specified will override the status parameter when publishing to that provider. In other words, the status parameter (see above) specifies the default text to be used for all social networks and Status specifies the text to be used for the specific network.
|||userLocation||JSON Object||The location to which this status update refers. Assigning a location to status updates is currently supported by Twitter only. The value of this parameter should be a JSON object containing the following fields:|
Response Object Data Members
|providerPostIDs||array||An array of JSON objects representing the social network's post ID. Each object has the following fields:|
In the Update Status page you will find a complete working example which uses socialize.setStatus method. You may view the code, run it and view the outcome.