Xeerpa Connect Discovery assumes you have already implemented your own Social Login functionality on your website, mobile application, or WiFi hotspot. If this is not the case, please inquire about our Social Login Xeerpa Connect Backend Auth which facilitates connection with the API of each social network with Xeerpa.
Xeerpa is compatible with Social Login providers like Gigya, Janrain, LoginRadius, Cool-Tabs and EasyPromos, if you are using them you should check their specific documentation instead of this.
Xeerpa Connect Discovery is a web service that, once called for each user logging in to your website, allows Xeerpa to process the social data of those users that connect via the social login buttons you may have provided.
When a user logs in with their social profile on your website or app, you'll need to make a GET request from your server through the Xeerpa Connect Discovery web service so that Xeerpa can generate a profile for that user in the Xeerpa Dashboards. This call requires a specific set of parameters to be sent to Xeerpa.
This is the basic data flow designed for Xeerpa Connect Discovery using Facebook:
Step 1: Information you'll need to send us
Firstly, you need to let us know (by email at support@xeerpa.com) the following information about your apps:
Step 2: Connect your app to Xeerpa
Implement the call to our Xeerpa Connect Discovery web service, which will need to be launched by your server every time a user accepts your app permissions or logs in:
robinson=true : User doesn't want to receive commercial communications.
robinson=false : User wants to receive commercial communications.
A successful response would be a JSON with:
"errorCode": 1,
"message": "New user successfully added to Xeerpa Connect Discovery queue“,
“query”: {
“clientId”: 58398f9,
“clientPwd”: jg93j93,
“socialNetwork”: FB,
“appId”: 38147865,
“userId”: 64064705,
“userToken”: AAAFa8FEOR5kBAE6bOJ },
“queueId” : “54da2af9aa52d7f4d2f4147f”
}
Examples:
i. An example of a basic request for a Facebook app would look like this (you can test all calls in your browser before implement them in your server):
ii. A basic example for Twitter is shown below:
iii. Another example with more parameters:
Sending additional profile data to Xeerpa
Xeerpa Connect Discovery will retrieve all the user data from the social network based on the consents granted by the user in the social login process. Additionally, other information related to the user can be sent to Xeerpa so it is stored as part of the user profile. For instance, fields populated by the user in the registration form, or sales lines, can be sent into Xeerpa so they become part of the profile.
There are three ways of doing this:
1) With the DATA parameter:
Note that this method overwrites any previous data sent for the current app. To add data check the IDDATA option below.
2) With the IDDATA parameter:
For example:
This method will accumulate the values for the same user, adding the new set of data provided.
Step 3: Obtain advanced permissions
For Xeerpa to be able to gather and process the most important social information from the Facebook users, the Facebook Application linked to your Facebook Xeerpa Connection must be allowed to request the permissions to extract the advanced details. You can find more information about these permissions here.
Facebook reviews all the permission requests for every Facebook App, and this approval must be granted once for each Facebook App. You can use the Xeerpa Connect Summary Widget to obtain these permissions (user_friends, user_gender, user_birthday, user_location, user_posts, user_tagged_places and user_likes) - please feel free to request any further information about this Widget, contacting us through support@xeerpa.com.
Using Xeerpa Summary Widget for Facebook
This Widget is returned by Xeerpa as a JSON with some basic HTML which can be customized to match the look and feel of your website, mobile applicaiton, or WiFi hotspot, and can be extended to provide a more personalized user experience. Please check our Summary Widget article.
Include a parameter called connect to your Xeerpa Discovery call (please refer to previous section). When using this parameter, Xeerpa Connect Discovery will return 2 additional parameters:
Add the following parameter to your Xeerpa Connect Discovery call in order to use Xeerpa Connect Widgets:
Set the CONNECT param to the user's language LANG=“ES" or “EN" in the call to the web service described before and Xeerpa will return the HTML and CSS necessary to render the widgets. Simply transfer this HTML code to an empty div in your website or app and the widgets will be rendered. You can add your own CSS rules to override the default ones and adapt this HTML to your look&feel.
Xeerpa Connect Discovery will add this user to Xeerpa and will return a parameter called html with the code to embed into your app:
"errorCode": 1,
"message": "New user successfully added to Xeerpa Connect Discovery queue“,
“query”: {
“clientId”: 58398f9,
“clientPwd”: jg93j93,
“socialNetwork”: FB,
“appId”: 38147865,
“userId”: 64064705,
“userToken”: AAAFa8FEOR5kBAE6bOJ
},
“queueId” : “54da2af9aa52d7f4d2f4147f”,
“html” : “html goes here”,
“data” : {
“name” : “John”,
“surname” : “Smith”
}
}
Example:
An example of a URL through Xeerpa Connect Discovery including the call for the Summary Widget looks like this:
FAQS
Q: The web service is not sending any response
A: Requests to Xeerpa are usually made to port 8443, and your server making the request must allow sending and receiving of these requests and their responses. When no response is being received, typically it is because port 8443 is not available in your server. To increase security, you can limit traffic through this port requests to and from *.xeerpa.com.
Another posible reason could be that you are using POST instead of GET as request method. Please use GET.