I’ve already integrated facebook login in my Android app but my problem is here:-
My app uses its own OAuth mechanism when user decides the register and not use facebook or twitter log-in. Thus, does facebook send any persistant token that I can map with the user-id to generate an OAuth token for the user which I can use through out the app (for example doing post/upload operations)?
Edit:
Let’s say I log in via facebook and then I take it the next page where it has to register for my app after taking user info from facebook. And, now I am logged in. Let’s say that I remove the app. Install it again. And log in via facebook. I will be taken again to register screen and there will be another user, thus an issue. How do I prevent that? Does facebook send me some token that I can map with a username everytime it registers? What is the work flow?
You should add extra columns in User table like facebook_uid or Separate table to hold that inform, so along with all data pass the network (fb/tw) and its network_uid in signup/signin process. On login/signup check that facebook uid and return your application user Id, I have worked on integration of several social networks like this.