Table of contents
- 1. Description
- 1.1. Supporting Providers
- 2. Syntax
- 3. Method Parameters
- 4. Code Sample
Description
This method serves as an end point with a UI for posting a bookmark on a bookmarking destination. The method redirects the user to the specified bookmarking destination. This method has no response.
Supporting Providers
The following providers currently support this operation: Facebook, Twitter, Googleplus, MySpace, Messenger, Google, LinkedIn, Digg, Del.icio.us, Google Bookmarks, My AOL, Hyves, Baidu, StumbleUpon, Orkut, Skyrock, Tencent QQ, Sina Weibo, Kaixin, Renren, mixi, VZnet, FriendFeed, Reddit, Box.net, Tumblr, Plaxo, Technorati, Faves, Newsvine, Fark, Mixx, Bit.ly, Hatena, Mister Wong, Amazon, Gmail, NetLog, Evernote, AOL Mail, Current TV, Yardbarker, BlinkList, Diigo, DropJack, Segnalo, LinkaGoGo, Kaboodle, Skimbit, Formspring, V Kontakte, Pinterest, Spiceworks, Viadeo, nk.pl, Xing, Tuenti, Odnoklassniki, Douban.
Syntax
gigya.socialize.postBookmark(params)
Method Parameters
The following table lists the params object members:
| Required | Name | Type | Description |
| Required | provider | string | The provider to which to post the bookmark. The optional values for this parameter are: 'facebook', 'twitter', 'googleplus', 'myspace', 'messenger', 'google', 'linkedin', 'digg', 'delicious', 'googlebookmarks', 'myaol', 'hyves', 'baidu', 'stumbleupon', 'orkut', 'skyrock', 'qq', 'sina', 'kaixin', 'renren', 'mixi', 'vznet', 'friendfeed', 'reddit', 'boxnet', 'tumblr', 'plaxo', 'technorati', 'faves', 'newsvine', 'fark', 'mixx', 'bitly', 'hatena', 'misterwong', 'amazon', 'gmail', 'netlog', 'evernote', 'aolmail', 'currenttv', 'yardbarker', 'blinklist', 'diigo', 'dropjack', 'segnalo', 'linkagogo', 'kaboodle', 'skimbit', 'formspring', 'vkontakte', 'pinterest', 'spiceworks', 'viadeo', 'nkpl', 'xing', 'tuenti', 'odnoklassniki', 'douban'. |
| url | URL | The URL of the bookmark to post. This parameter is Required only if the linkback field of the UserAction is not specified. | |
| Optional | title | string | The title to assign to the bookmark. Note: some of the bookmark destinations do not support assigning a title to the bookmark. |
| description | string | The description of the bookmark. Note: some of the bookmark destinations do not support assigning a description to the bookmark. | |
| userAction | UserAction object | When specified, the parameters of the bookmark will be taken from this object, but they may be overridden by the other (existing) explicit parameters if those are specified. The default values of the userAction fields (if not overridden) are:
| |
| cid | string | A string of maximum 100 characters length. This string is associated with each transaction and will later appear on 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. The "Context ID" combo box lets you filter the report data by site/application context. | |
| providerKey | string | The provider-specific API Key. This parameter is used when calling this method for providers that require an API key. | |
| thumbnailURL | string | The URL of the thumbnail image. Note: this parameter is required for Pinterest in order to work. | |
| tags | string | A comma separated list of tags that are used to identify the share operation. | |
| actionAttributes | JSON object | In Gamification your users receive points for actions they perform on your site, in this case posting a bookmark 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 posts a bookmark, 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. These action attributes are later used to display the GM Plugins filtered according to a certain attribute. For example, you can show the Leaderboard plugin only for top users on the "Glee" page. These action attributes are later used to display the GM Plugins filtered according to a certain attribute. For example, you can show the Leaderboard plugin only for top users on the "Glee" page. This parameter receives a JSON object, comprised of a set or sets of a key (category) and a value or values, i.e.: "tv-show": ["glee", "30rock"], |
Code Sample
var params =
{
url: "http://www.gigya.com/"
,provider:'pinterest'
,title: "Gigya"
,thumbnailURL :'http://www.gigya.com/wp-content/themes/gigyatm/images/gigya-logo.gif'
};
gigya.socialize.postBookmark(params); - This sample is not meant to be fully functional code. For brevity's sake, only the code required for demonstrating the API call itself is presented.
- To run the code on your own domain, add your Gigya API key to the socialize.js URL. A Gigya API key can be obtained on the Site Dashboard page on Gigya's website. Please make sure that the domain from which you are loading the page is the same domain name that you used for generating the API key.
- In some cases it is necessary to connect/login the user to a provider? prior to calling the API method. You can learn more in the Social Login guide.

Comments