Session was deleted after link facebook

0 votes
Hello, I got problem with session id, i use "App42API.userSessionId" to get session id of logged user and it's work fine but when i link facebook with that user method "App42API.userSessionId" always return empty.
asked Jul 19, 2016 in Unity by copangtnc (45 points)

2 Answers

0 votes

Hi Copangtnc,

 

Could you please share some more details like before calling link facebook account method which method you are calling? If possible then please share the internal logs of all the below methods which you are calling:

  • Create User & Authenticate User method of User Service
  • Getting the user profile 
  • Link User Facebook Account of Social Service

To print internal logs, put the below line of code just after the key initialization:

App42Log.SetDebug(true);

 

Regards,

Himanshu Sharma

answered Jul 21, 2016 by hs00105 (2,005 points)
0 votes

* Summary my code:

- First i create user with UserService.

- On success method (from callback of create user)

  + Get session id from response and save to local.

  + Log session id from "App42API.userSessionId"

  + Call LinkUserFacebookAccount.

- On succes method (from callback of link Facebook)

  + Log session id from "App42API.userSessionId"

* My log:

POST URI : https://api.shephertz.com/cloud/1.0/user?

Waiting For Response...

Success Value : {"app42":{"response":{"success":true,"users":{"user":{"userName":"601953716632246","email":"copang_ng@yahoo.com","createdOn":"2016-07-21T07:29:38.933Z","sessionId":"4251bdb3-e8ee-4959-82c4-e03c3a329cef"}}}}}

buildResponseForObjectService resource: user

Session id before link Facebook: 4251bdb3-e8ee-4959-82c4-e03c3a329cef

POST URI : https://api.shephertz.com/cloud/1.0/social/facebook/linkuser/accesscredentials?

Waiting For Response...

Success Value : {some value from facebook profile like first name, last name, ...}

buildResponseForObjectService resource: social

Session id after link Facebook: (empty string, so it was deleted?)

answered Jul 21, 2016 by copangtnc (45 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...