I work with websites for iOS and Android applications and have to develop a service for entering social networks.
The application must support Twitter, facebook, linkedin and google plus login.
As parameters, I accept the user ID from the social site and the site from which this ID was sent, and basic user information, such as first name, last name and email address.
Below is the structure of the corresponding tables for this
userid is basic and email is unique
user social networking table
userid | site | Marker
When I get this information from the external interface, I first check if the social user ID exists. If the social id does not match, I check if the email exists in db or not. If the email address is not in db, I register a new user.
Now the main problem is that twitter sdk for android and ios does not return email, and even facebook does not return email if the user is registered by phone, because of this I had a problem that uniquely identifies the user to my end. I searched a lot, but I can not find a solution for this.
Please correct me if I am mistaken anywhere in my approach and offer me how I can deal with the email problem.
source share