{
"status": "ok",
"friends": [
{
"status": "offline",
"picture": {
"data": {
"url": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif",
"is_silhouette": true
}
},
"first_name": "Kunal",
"name": "Kunal D.",
"src": "fb",
"id": "xxxxxxxxxxxxxxx",
"playblazer_id": 351
},
{
"status": "unregistered",
"picture": {
"data": {
"url": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif",
"is_silhouette": false
}
},
"first_name": "Neetu",
"name": "Neetu G.",
"src": "fb",
"id": "xxxxxxxxx",
"playblazer_id": null
},
{
"status": "unregistered",
"picture": {
"data": {
"url": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif",
"is_silhouette": false
}
},
"first_name": "Nikhil",
"name": "Nikhil S.",
"src": "fb",
"id": "xxxxxxxxx",
"playblazer_id": null
},
{
"status": "unregistered",
"picture": {
"data": {
"url": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif",
"is_silhouette": false
}
},
"first_name": "Anteema",
"name": "Anteema A.",
"src": "fb",
"id": "xxxxxxxxxxxxxxxx",
"playblazer_id": null
},
{
"status": "online",
"src": "phonebook",
"first_name": "Kunal",
"last_name": "Gangakhedkar",
"picture": {
"data": {
"url": null
}
},
"playblazer_id": 297
},
{
"status": "unregistered",
"src": "phonebook",
"first_name": "Nikhil",
"last_name": "Soman",
"picture": {
"data": {
"url": null
}
},
"playblazer_id": null
}
]
}
Social Graph¶
API: Set Token¶
URL: {BASE_URL}/app/<APP_ID>/social/graph/<MODE>/<USER_ID>/token
Request Method: HTTP POST
The expiry time of the token - after which using this token is not possible.
Units are in seconds.
If successful, the output will contain status=ok state - of course, in the format that is specified in the API call; otherwise, status=error and error details encoded as explained earlier.
If any of the two params - token and expires - is missing, the API will generate an error.
Example¶
Note
Sensitive information is masked out in the following examples.
1. Error - when ‘token’ is missing (this takes priority - since without the token, the ‘expires’ parameter makes no sense):
URL Call:
Output:
2. Error - when ‘expires’ is missing:
URL Call:
Output:
API: Get friend-list¶
URL: {BASE_URL}/app/<APP_ID>/social/graph/<MODE>/<USER_ID>
Request Method: HTTP GET
The filtering parameter - specifies what kind of profiles/friends to show.
Possible values:
The source of the graph - to return entries only from a specific social graph.
Possible values:
In case of error, the output will contain status=error and error details encoded as explained earlier.
If successful, the output will contain status=ok state along with a list of friends and their attributes as returned by the social media platform - of course, in the format that is specified in the API call.
Example¶
Note
Sensitive information is masked out in the following examples.
Note
If the user has multiple social IDs associated with the profile and if we have access to the social graphs from multiple sources, those will be returned in the combined output and the source of the entry is tagged with src attribute indicating the social graph from which the entry was gathered.
Note
We now support phonebook as a social graph as well. You’d need to call the API: Upload Phonebook from the Social Graph module to upload the user’s phonebook.
Warning
Since email and phone no. of the user are sensitive information, they will not be returned in the social graph output - so that it’s not harvested by spammers.
Instead, we return the playblazer_id - if available, or the phonebook_id which identifies the user entry in the uploaded phonebook.
null value for playblazer_id indicates that the user does not exist in the Playblazer database. The status for the user will be unregistered.
1. Successful call:
URL Call:
curl "http://api.playblazer.com/v1/app/1/social/graph/fb/kunalg?secret_key=cb8d878989b9478e96d1b1574a1bf4ec"
Output:
API: Upload Phonebook¶
URL: {BASE_URL}/app/<APP_ID>/social/graph/<MODE>/<USER_ID>/phonebook
Request Method: HTTP POST
Required HTTP Header: Content-Type: application/json
If successful, the output will contain status=ok state - of course, in the format that is specified in the API call; otherwise, status=error and error details encoded as explained earlier.
Each entry in the phonebook array has the following fields:
Note
The phone no. must be in the E.164 format - that is a ‘+’ sign followed by the country code followed by the national phone number.
Avoid using any separators between numbers - like spaces, hyphens/dashes or brackets.
The output will contain the following entries along with the “status” field:
Example¶
URL Call:
Output: