|
|
|
|
Developer's GuideFrom $1Welcome 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:
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:
For advanced Gigya Socialize developers, there are few advanced topics in the developer's guide:
Prerequisites for Using the Gigya Socialize APIWhen creating pages that employ the Gigya Socialize API, please make sure you have complied with the following requirements:
Note: For development and testing purposes, it is possible to run Socialize on 'localhost' and with any valid API key.
An Asynchronous Programming ModelGigya 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 NamespaceThe 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 CallsAll 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 DefinitionsAPI 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.
GlossaryFew 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.
Tags:
|
||||
|