You are not logged in.   Log in | Register

Developer's Guide

From $1

Welcome to the developer's documentation for Gigya Socialize API.

The Developer's Guide is a practical tutorial-like guide for programmers who wish to integrate Gigya Socialize into their website\application.

Gigya Socialize supports two different platforms:

  • Socialize JavaScript API - for integrating Socialize in websites.
  • Socialize ActionScript3 API - for integrating Socialize in Flash applications.

The two APIs are equivalent and, apart from minor differences, almost identical. For this reason, most of the documentation is mutual, and the differences are highlighted.

The guide starts out with some fundamental concepts that are required for developing applications with Gigya Socialize.

It then continues with Socialize Basics, which includes a basic example using Gigya Socialize (i.e. the "Hello World" of Gigya Socialize) and a guide for using Gigya Socialize API methods. It is highly recommended that you read this document before you begin coding.

You may then continue on to learn more about:

  • How to integrate Gigya Socialize pre-built web GUI elements in your site/widget Using Socialize Widgets.
  • How to handle Events generated by Gigya socialize.
  • How to implement the Authentication Process.
  • Learn how to implement tools for enabling your users to Share Content and site activities to Social Networks.
  • Learn how to embed a Newsfeed Widget in your site, for displaying recent user activities in a feed stream.

 For advanced Gigya Socialize developers, there are few advanced topics in the developer's guide:

  • Learn how to incorporate Security functionality into your integration with Gigya Socialize.
  • If you wish to integrate Gigya Socialize in your server, Server Side API (REST) will guide you through.
  • Learn about Gigya's Reports.
  • If you are a control freak, learn about some Advanced Customizations options.

 

Prerequisites for Using the Gigya Socialize API

When creating pages that employ the Gigya Socialize API, please make sure you have complied with the following requirements:

  • You have acquired your API key from the Site Setup page on Gigya's website (See also the Socialize Setup documentation). Please make sure to modify the API Key in the code examples that appear in the documentation, before trying to run them.
  • When running pages, make sure that the domain you are loading the page from is the same domain name that you used for generating the API Key.

 

Note: For development and testing purposes, it is possible to run Socialize on 'localhost' and with any valid API key.

 

An Asynchronous Programming Model

Gigya Socialize uses an asynchronous programming model in which operations are triggered and then run in the background until they are completed. 

Upon successful or unsuccessful completion, the operation invokes a callback function - which is provided by the developer, and returns a response object that includes the results of the operation. The callback function should handle the response in an appropriate manner, as determined by the application.

The same callback function may be used to handle multiple events.

  

The API Namespace

The entire range of Gigya Socialize functionality is provided as methods of the gigya.services.socialize namespace, thus all methods are referenced with the gigya.services.socialize prefix. 

 

Making API Calls

All the methods in the Gigya Socialize API have a common signature:

gigya.services.socialize.method_name(conf,params);

 

Both "conf" and "params" are actually objects that contain multiple members (for details about these objects and their structures, please refer to Socialize Basics and the API reference).

We choose to use these two objects instead of passing parameters in the "classical" way - this provides flexibility in adding new parameters without "breaking" older code.

 

Integration Definitions

API Key – This is a unique key assigned for a specific domain and is used to verify that API calls are made from authorized domains. You may obtain your Gigya API-Key from the Site Setup page on Gigya website.

Callback function – Callback functions are used to return results of Gigya Socialize method calls when the method is expected to take a long time to execute. This programming model is known as asynchronous because the result of a method call is not returned when the method call returns but instead it is returned after a while by calling the associated callback function.

The callback function should be implemented by the application using the same signature that is expected by the API method called. Currently - all Gigya Socialize methods require the same callback signature, which receives one parameter - a response object.

Context Object – Context objects are commonly used in asynchronous programming to allow the application to store and pass information between callbacks. All the Gigya Socialize method calls can accept a context object (as member of the 'params' object) and then pass it back to the application through the callback function (as a member of the 'response object parameter). Gigya Socialize never attempts to read the context object. Creating and interpreting its meaning is then left up to the application.

 

Glossary

Few terms which are used throughout the Gigya Socialize documentation:

GS - An acronym for Gigya Socialize.

SN - An acronym for Social Network.

Providers - is referred to the social-networks / webmail providers, such as: Facebook, Myspace, Yahoo, Gmail etc, which are used for authentication and social services.

Partner/Site - is referred to your site, or any site which uses Gigya socialize.

 

 

| Next to 'Basics' >

Tags:
Files (0)