SPlus.Search.getScopes (url, function (scopes){
for (var i=0; i < scopes.length; i++) {//Loop the scopes Array
var scope = scopes [i];//Getting one of the requested scopes
//TODO: Implement what to do with the scopes
}
}, function (errorResponse){
var error = errorResponse['error#displayValue']; //Getting the error
//TODO: Implement how to handle errors
}, function (cancelResponse){
//TODO: Implement how to handle a user’s cancel
});