Start a new topic

too short FB accessToken in Kinvey _socialIdentity using kinvey-nativescript-sdk

Hi,


I have working log-in process with Facebook using Kinvey MIC on my NativeScript app. I am able to log-in into the Kinvey and _socialIdentity record is successfully created. Due to the fact that I need to know also user's email registered with FB account (that is not sent in basic User response from FB), I need to query  FB Graph API for that. 



If I use a accessToken stored in Kinvey's _socialIdentity, FB returns:

"error": {

JS:     "message": "Invalid OAuth access token.",

JS:     "type": "OAuthException",

JS:     "code": 190,

JS:   }


If I use accessToken generated by FB developers tool and hardcode it into my NS code, everything works well - I receive all requested info. 


The difference I found is length of the accessToken:

accessToken stored in Kinvey has 40 characters but the one generated by FB tools has 247 characters.


Could somebody explain why accessToken in Kinvey's _socialIdentity is short/impossible for further use or how to get a valid accessToken using kinvey-nativescript-sdk?


Thank you 

  

Login or Signup to post a comment