Access User data

The following functions are called on Oahu.connect. e.g.

Oahu.connect.getAccount()

Get the User account

You can get the full Oahu account as an object by calling :

getAccount()

This will include Oahu specific data plus any available provider’s data.

Get specific data

It is also possible to get some specific data from the Oahu account or from any provider by calling getInfos with sending “Oahu” as the provider :

getInfos(providerName, [fields], [callback])

Where :

e.g.

Oahu.connect.getInfos("Facebook", ['id','name'], function(result) {
  // Do something with the result
})

This should return an object holding the id and name of the Facebook User.

Note : If fields is not specified, all available fields are returned

Get permissions

You have the ability to get the User’s permissions from a specific provider :

getPerms(providerName, [callback])

Where :

Get contacts

You can get the list of the User’s contacts from a specific provider :

getContacts(providerName, [callback])