Do I need my own user database in order to use Google & Facebook sign in? - facebook

I have a well functioning login system right now. Im in the process of implementing Google+ and Facebook login too. Its works fine. But:
When a user logs in via Facebook or Google shall I create a new user in my web apps users database? If so, what should i fill as password?
Lets say a user has logged in via Facebook and he inserts a new book in the books table. What shall I put in the creator column of the inserted row? Usually I put the user id of the logged in user which has a row in the users table.
A user doesnt have an account on my web app. He signs in for the first time using Google+. What happens to that user if he later on chooses to remove my site from his connected accounts on google? This might be related to the first question.
Thank you.
The Documentation of the both API are really great and understandable. But I could find answers to my questions.

It's technically possible to use Google+ Sign-In without data persistence. As an example, you can see client-side-only Google+ Sign-In features on the Is Too Cute demo site.
There are certain benefits to adding data persistence and managing your own set of users but there is still a ton of great functionality you can get without needing to implement a data store:
Over-the-air Android installs
Interactive Posts
Personalize the site to the user
Access Google APIs while the user is actively browsing your site.

Related

Permanently associating a website's account to facebook account

I have the task to integrate some commercial sharing stuff into a website.
The idea is that the user a) logs in/registers in the website, b) the user connects his user account with his facebook account - by adding and accepting the website application.
Here comes the interesting part - is there a way of linking the facebook account with my website's account so that I can send them updates and promotions directly to their walls programatically?
In the application dialog, it's clearly noted that the user allows the application to write to the user wall so they accept and agree this. Then, for example, if I want to send them a promotion or update directly on their wall using the fb application api, how can I achieve this? All the tutorials I've read consider the user using the Facebook Login
The concrete idea is something like weekly promotion feed that my clients want to allow customers to allow being posted directly on their walls. As I don't have any experience with facebook development, I'd appreciate knowing how, if at all possible, this can be achieved?
Most of what you're suggesting is against policy, and isnt' technically possible either as users need to come back to the app once every 60 days for you to have a valid access_token for them.
The Authentication docs explain how to get access to a user's information with their permission, and the Permission documentation explains which permissions grant access to which functions or fields.

Can I add profile data to a facebook test user?

I have a facebook application that requires user data (specifically location). I am trying to use the test user api but I can't figure out how to add additional info to my test users besides through logging into fb and changing it on the page. Is there a way to do this through the api either through initialization or by using an api call to update a user?
Someone posted this question here, but there is no answer yet.
Today I exactly ran into the same problem. I have an application that uses the location information of facebook users and now I'm searching for a way to automate the creation of these users for testing purpose.
You can now log in as a test user and update any profile information the same as a normal user within your app settings. However, you cannot interact with other users or 'like' pages, etc.
Section: Apps > Edit App > Developer Roles
URL: https://developers.facebook.com/apps/[APP_ID_HERE]/roles?ref=nav
Facebook doesn't have any graph api's to update profile information besides their current status. This includes test users. You can only set the name, password, and email when you create the user too unfortunately.

Managing multiple login schema for site - need advice

I want to set up my site to allow people to sign in using a facebook account. But in the near future I would also want to allow a provision to allow people to sign up using twitter, linkedin, even their open id accounts if they have one. However I need to set up my system so that a user may be able to login using whatever way he wishes and yet be able to maintain all his logins with his one account.
I have a users table which has the basic details:
USERS:
ID|NAME|EMAIL|PASSWORD
And think I should set up a logins table in this case like:
USERS_LOGINS
USER_ID|LOGIN_TYPE|LOGIN_ID
like in the second table if he signs up using facebook the Login type would read Facebook and id would be his fb id and so forth.
Is there any kind of service that already does this for you or any open source code I can use? My application is being built on the zend framework
Thanks
You might want to check out Janrain Engage. It will probably be the fastest and easiest way to support multiple login types.

Social Media Linking

I've done a little searching and was wondering if there is a way to link a users account in our web app with their social media accounts they choose to link (facebook, twitter, etc). i.e. when they log into our web app they are auto logged into facebook, twitter, etc?
I see facebook has an api to login to our web app using their facebook book account but I want it to work the other way around, I want them logged into facebook when they log into their account via our web app.
Thanks,
Ryan
It is definitely possible-from your question I assume you would like to pull data and make actions on behalf of a user? If so, you will need the offline_access permission as well as all the other permissions you will need (check out the list here to see exactly which ones you require). Then, you can trigger a script on your server that tell facebook as soon as the user is logged in to your site, to log in your application as the user as well.
NOTE: You might be going about this in the wrong way. I would advise that you specify a bit more details on what exactly you need the user to be logged in for, and I can (probably) provide you with a decent answer.
EDIT: In response to your question in the comment, Ryan, here is my answer:
You need to divide this problem into 2 different situations-one: your company wants you to write all the code from scratch and don't use what facebook has to offer, in which case you should create a custom login script that enables your users to use their facebook account as the Actual user account in your web app. This is the best solution in my opinion, and is supported by the ever-so-awesome Jeff Atwood. Here's a link to how to do just this, and a tutorial about this also.
Or your company is comfortable with using Facebook's Social Plugins.
Then you should focus on Like Button & Comments : These social plugins are the best way to enable people to create social experiences if they're already logged in.

Getting list of users from our facebook connect application

I have a website that uses facebook connect to allow users to login to the site's login system. If I want to verify that the facebook user id's captured by our database match those who are authorized by facebook to our application by facebook and vice-versa, how would I do that?
For example, if I log in the facebook developer application and it tells me that we have 7 users (I assume this means 7 people who have "connected" to our application), where would I find a list of those 7 users.
I assume their facebook user id's are public information, yet I would like a way to obtain them in a list pertaining to our application.
I assume that this is common for the purposes of database maintenance (and in my case just to verify that everything is working properly).
Looks to me based on the dev console that you can't get a list like this. The best you can do is get friend.getAppUsers() which gives you a list of your friends that have the app installed. Bummer; I actually really need this too for an application I'm working on. I guess just use the post-authorize, deauthorize callback urls to manage the list of users on your end.
I missed first lot of application users too.
Then I start to add username and ID to database as soon as they visit the first page of application after authorizing the application.
Now anybody new comes to my application they are added to 'appusers' table