Issue with acesstoken in faceook login/connect in Titanium ?

You must Login before you can answer or comment on any questions.

I want to implement the Facebook connect in my application.

While implementing the Fb connect I am facing a strange issue with the facebook connect when i try to get the acesstoken using

Titanium.Facebook.accessToken

My App ID/API Key for testing/development phase is

4441715..602396

and app_secret is

9aac506d625ce....57487892aaa5b31

when I try to implement facebook login via web and mobile I am getting two seperate acess_codes

For Web :

.........qHsBAFpFramuWiBRWHCXQstlEFA8TrtKQ7ZA8Nzz8f3kbZAjOOZB7na3uBPlhNzSZAFyIoVv1NjRYBsDgpWA0uAUIPf4YaSy6g...
For Mobile
.........AvFwBAGAdEreihOPTYM6oUieHIPtbyPaoz073UJECZCfF1hvk5n35VR6gyhkcnCSZA421ZAWFG8QUzEf5Y88QNcOZCuV2yIEwqA...
Which doesn't match. Except the few 5 alphabets and last 3 alphabets.

— asked 2 years ago by Sahil Grover
2 Comments
  • Titanium.Facebook and webView generate their own AccessToken and can you tell us what you want to do ?.

    — commented 2 years ago by Nitin Chavda

  • @nitin I am building an application for the website and getting data from the same server on which website runs. We can assume that I am using the access token as the password for login, in case user wants to use facebook connect. If the acesstoken is different for both cases how do I validate the user ???

    — commented 2 years ago by Sahil Grover

3 Answers

Accepted Answer

Hi Sahil,

You can store that AccessToken separately in Properties and check if you use webview then pass that accessToken and when user use Ti.Facebook then use another AccessToken.Hope that help you. Best luck

— answered 2 years ago by Nitin Chavda
answer permalink
1 Comment
  • @Nitin as per my view the AccessToken is unique relation between the app_id and user_id.

    So whether u hit facebook form the web or from mobile it should always return you with the same AccessToken ?? Please verfiy !!!

    — commented 2 years ago by Sahil Grover

I dont really understand what the problem is here?

— answered 2 years ago by Ashish Nigam
answer permalink
1 Comment
  • @ashish I wanted to map acesstokens. But the acesstoken which i get from the server side authentication and titanium.facebook authentication doesn't match. Now I have made a new field in database for seperate tokens.

    — commented 2 years ago by Sahil Grover

Your Answer

Think you can help? Login to answer this question!