Cordova plugin that handles Gigya integration for mobile (iOS and Android) apps.
Project uses mobile native Gigya SDK for iOS and Androidplat to utilize basic operations for a mobile app that uses Cordova.
It's mandatory to use the native Facebook integration, for that we need to use the FacebookSDK.
Download the latest iOS FacebookSDK, and follow the getting started guideline.
Copy the facebook framework to your project folder
cd my_project
cp -R ~/Documents/FacebookSDK/FacebookSDK.framework .
# This is the default location
It's mandatory to use the native Facebook integration, for that we need to use the FacebookSDK.
For more info go to the getting started guideline.
To add this plugin just type:
cordova plugin add https://github.com/platanus/cordova-gigya --variable FB_APP_NAME=<facebook app name> --variable FB_APP_ID=<facebook app id>
cordova plugin remove us.platan.gigya
The plugin has the following methods:
Initializes the Gigya SDK and sets your partner API key.
cordova.plugins.CordovaGigya.initialize(apiKey)
Displays a provider selection dialog, allowing the user to login to any of the supported providers.
cordova.plugins.CordovaGigya.showLoginUI(
['twitter', 'facebook'],
{
cid: "context id"
},
function(user){
console.log(user);
},
function(error){
console.log(error)
})
Login the user to a specified provider.
cordova.plugins.CordovaGigya.login(
"twitter",
null,
function(user){
console.log(user);
},
function(error){
console.log(error)
})
Logs out from Gigya and clears the saved session.
cordova.plugins.CordovaGigya.logout(
function(){
console.log("logged out");
},
function(error){
console.log("ios error");
console.log(error);
})
Sends a request to Gigya server. This method is used for invoking any of the methods supported by Gigya's REST API.
cordova.plugins.CordovaGigya.sendRequest(
"socialize.getSessionInfo",
{
provider: "twitter"
},
function(user){
console.log(user);
},
function(error){
console.log(error)
})
Retrieves the current session.
cordova.plugins.CordovaGigya.showLoginUI(
function(token){
console.log(token);
},
function(){
console.log()
})
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Thank you contributors!
cordova-gigya is maintained by platanus.
Apache License Version 2.0.