Can I restrict users connecting via Facebook Connect?

I am creating a website and I want it to integrate with Facebook Connect.

I want to restrict users from only connecting to those who are in a specific Facebook group or so that they connect and the administrator approves their account. Is it possible?

+1


a source to share


1 answer


This should be quite achievable.

Imagine a login page for your site where the user has to log in using Facebook Connect. (See " " Authenticating Users with Facebook Connect ") Once they are logged in, you will be presented with a Facebook Session ID specific to that user. You can use this Session ID to request information about a user, or inside a page using Javascript API libraries, or on the server side (see " Using Facebook Connect with the Server Side Libraries ").



One of the API calls: groups.get , which returns the groups the user is in. You should be able to get associated user groups after they have logged in to Connect, and as part of a page load test to see if they are in the correct group. If they are not, just redirect them accordingly.

+2


a source







All Articles