Using Facebook, Twitter or GMail to Log in to My Application

I am developing an iOS 4 application with the latest versions of the SDK and Xcode 4.

I need users to register in my application using their Facebook, Twitter or GMail account. But I also need to know a user who has a login.

In other words, each user will have some specific data, and I need to know what data is intended for a particular user. Example: there will be a lot of house when a user buys a house, I need to know which user bought this house.

When a user logs in to Facebook or Twitter or GMail, is there an identifier associated with this account?

I need an identifier for storage on a Windows Azure server, and I will use it to identify this user and retrieve all of his game data.

+4
source share
2 answers

So, I think you are going to authenticate users through OAuth on fb / twitter / google. When you have an access token, make api calls with it:

https://api.twitter.com/1/account/verify_credentials.json 

for twitter,

 https://www.googleapis.com/plus/v1/people/me 

for google + (assuming the oauth area was google +: https://www.googleapis.com/auth/plus.me ) and

 https://graph.facebook.com/me 

for facebook.

You will receive an identifier in the response.

+4
source

You can save your data after entering the database or file. from where you can get information about which user enters the login, using which api and when you like all the information you want.

0
source

Source: https://habr.com/ru/post/1390377/


All Articles