This only shows a facebook example, but i just wanted to get a highlevel discussion going. I have a JS implementation, partial, since i am using it in another project. But it is tailored to my needs.

I'm sure i forgot a few things

AeroGear Social

Since this can be more that just a "login", it probably needs it's own category instead of being added to Auth.

Basically, i see AG Social as a common way to access social network api's such as facebook[1], google plus[2], twitter[3], and others.

It would be a wrapper around the current platform SDK's

There are a couple a common themes for most if not all the social platforms

  1. you need to create an "app" on the respective platform that can act on your behalf
  2. you need to provide "scopes", which are what information the app can access.

For example, using the Facebook SDK, you cannot access the users email by default. you need to provide this scope and the user will have to authorize the usage when they log in.

a quick javascript example of how it could look during creation

var AGSocial = AeroGear.Social();

AGSocial.add({
    name: "FB",
    type: "facebook",
    settings: {
        clientId: "1234567890", //the app id provided by the platform
        scopes: "email", //the "extended permissions" we want the user to authorize
        channelFile: "//www.site.com/channel.html"  //specific to facebook,  for crossdomain
        ....  //Other platform specific settings or just other settings
    }
});

var facebookSocial = AGSocial.socials.FB;

while "socials" might be a good name for the "modules", i'm still leaning to "stalkers", but probably not appropriate

Proposed API's - to Begin with.  All names a debateable

examples below will continue building off the one above

Here are a few of the basic methods that we could start off with

LoadSdk

This loads the SDK of the specified platform.

The SDK's documentation recommends loading the scripts asynchronously. This gives a common way to load and then, if needed, wait for all the "socials" sdk's to load

for JS, i wanted to load the sdk during the Login() method, but popup blockers interfere with this idea

Login

this is probably an obvious one.

Logs the user in using the specified platform.

Me

Gets your profile information. Must be called after a Login


    facebookSocial.me({
        fields: "picture, id,name, email",
        success: function( response ) { ... },
        error: function( error ) { ... }
    });

Logout

also obvious. Logs the user out.

Other Possible API's to begin with

Friends

A common way to get your friends list

Share

a common way to "Post" something to whatever platform


[1] [2] [3]