I'm making a canvas game on Facebook, using html/js (and a little php). I'm trying to use the facebook users id, to login or create a similar parse.com user, to store relevant game data for the user.
I'am using this function (straight from tutorial):
function getLoginParamsFromAuthResponse(authResponse) {
return {
id: authResponse.userID,
access_token: authResponse.accessToken,
expiration_date: convertExpiryDate(authResponse.expiresIn)
};
}
When printing out the accessToken, and using facebook debug tool, it is found to be valid.
I reviece the following error when the code is executed on facebook:
POST https://api.parse.com/1/users 400 (Bad Request) parse-1.2.16.min.js:1
e.Error {code: 251, message: "Parse::InvalidSessionError"}