Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
11/27/14 11:28 AM (9 years ago)

Using Facebook Login

So thanks to Chris1's social login plugin, my app successfully logs in using facebook (awesome plugin BTW!). This is great, but now curious as to if I can store data using the facebook login. For example, lets say a user logs into my app using facebook. Is there a way I can store data using that login, on the facebook app, then have that data retrieved once the user is logged in? As an example, let's say I want to store a number, like points. When the user logs into my app using facebook, I'd like that number of points stored in their account to be inserted into a label in my app. Then obviously some piece of code somewhere in the app that will sync the point total back to the facebook app data at some point, like when the score updates. Is this possible?
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
11/27/14 12:04 PM (9 years ago)
If anyone can figure it out, it would be you my friend! LA
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
11/27/14 08:22 PM (9 years ago)
Where do you want to store that data? I agree with LA, you already know how to do this. Sounds very similar to your database plugin. Perhaps I am not understanding your question. Happy Thanksgiving! -- Niraj
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
11/27/14 08:33 PM (9 years ago)
In the facebook app itself, not in the iOS app. My app would basically retrieve the info from the facebook account, the same way it can see the users name, email, etc. The difference in the one I made that fetched and retrieved data from a wordpress site is I had full backend access to the wordpress site. No such luck with facebook, lol. Maybe I'm misunderstanding the facebook login SDK... is it for authentication only? I would assume if we make our own facebook app using the SDK, we should be able to store and retrieve info in that app floating around in the facebook cloud... but maybe I'm mistaken?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
11/27/14 09:06 PM (9 years ago)
With a guess, you can't do writes back into the Facebook ecosystem with your own dataset. However, you can use Facebook's Parse to save data in their cloud. Time to start munching on Parse's SDK ...
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
11/27/14 09:24 PM (9 years ago)
Ah, ok, that explains it. I thought that by creating the facebook app for our iphone project that we were basically creating a little mini dataset on facebook's servers to store data that the app may use, or that we can use about the member that we could access. I can store the data on the users device... I just thought if I was having a facebook login anyways, I might as well make the data a little more secure and not as easily accessible. No biggie. So, what advantage would a user have by logging in via Facebook or Twitter as opposed to not having to login at all? Just trying to wrap my head around the advantage of having them login via Facebook, if my app cant read or write anything to the servers using their facebook login for the app.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
11/28/14 12:36 AM (9 years ago)
Instead of rolling your own User Authentication mechanism, you outsource that to Facebook.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.