Jevgenij Nekrasov
Jevgenij Nekrasov

Reputation: 2760

Facebook authentication with WP7

I am bit stuck with facebook authentication in my wp7 app.

What I have right now:

  1. login page with WebBrowser control
  2. I can get access_token from facebook
  3. Save it to phone IsolatedStorage

What I want to do is to skip login page if the user is already authenticated, but I don't really understand the flow, what condition should I check.

On server side I have REST api, when user is authenticated I get his personal information from facebook and call my api to store this information in the database + access_token. Then I used it with all requests to secure my api. Is it good approach?

Upvotes: 1

Views: 286

Answers (1)

Shahar Prish
Shahar Prish

Reputation: 4849

You don't really check a condition. You try to do whatever it is you want to do with the access token (post status, upload picture, or whatever) and then, if you get an oauth exception, you go and bring up the browser again to get a new access token (browser will just flash - it won't require any user input unless they actually changed their password or something)

Upvotes: 2

Related Questions