Sign In Register

How can we help you today?

Start a new topic
Answered

Challenge through push notification

Hi,


How complicated is it to implement sending a push-notification in order to challenge an offline facebook friend (who already installed the game)?


Thanks!


Best Answer

For creating a challenge you need the opponents Player ID. You can get the friends list and their PlayerID's from ListGameFriendsRequest .

FYI, For Facebook login, it returns only people who installed the same app.


Every CreateChallengeRequest will issue a push notification (along with socket notification). You can check Messages section of Configuration on left side of this window to get more control ( http://inft.ly/3hcZW6a ).


Attaching sample Challenge request.


  

{
 "@class": ".CreateChallengeRequest",
 "accessType": "PRIVATE",
 "challengeShortCode": "ASYNC_CHALLENGE",
 "endTime": "2015-12-31T12:00Z",
 "maxAttempts": 3,
 "maxPlayers": 2,
 "minPlayers": 2,
 "silent": false,
 "usersToChallenge": "5524e6c01b3f58c687ed7299"
}

  





1 Comment

Answer

For creating a challenge you need the opponents Player ID. You can get the friends list and their PlayerID's from ListGameFriendsRequest .

FYI, For Facebook login, it returns only people who installed the same app.


Every CreateChallengeRequest will issue a push notification (along with socket notification). You can check Messages section of Configuration on left side of this window to get more control ( http://inft.ly/3hcZW6a ).


Attaching sample Challenge request.


  

{
 "@class": ".CreateChallengeRequest",
 "accessType": "PRIVATE",
 "challengeShortCode": "ASYNC_CHALLENGE",
 "endTime": "2015-12-31T12:00Z",
 "maxAttempts": 3,
 "maxPlayers": 2,
 "minPlayers": 2,
 "silent": false,
 "usersToChallenge": "5524e6c01b3f58c687ed7299"
}