// Utility function to link a user's twitter info to the current user. function _linkIdentity() { var identityOptions = { id: this.params.raw.user_id, accessToken: this.params.access_token, accessSecret: this.params.access_secret, screen_name: this.params.raw.screen_name }; return BB.resolve(grasshopper.request(this.token).users.linkIdentity(this.user._id.toString(), 'twitter', identityOptions)); }
.then(function() { return grasshopper.request(this.token).users.current(); })