Skip to content

Loading…

Fixed Fitbit and Improved LinkedIn integration #23

Merged
merged 3 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 7, 2012
  1. @pspeter3
  2. @pspeter3
Commits on Sep 9, 2012
  1. @pspeter3
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +1 −1 lib/services/fitbit.js
  2. +3 −2 lib/services/linkedin.js
View
2 lib/services/fitbit.js
@@ -62,7 +62,7 @@ Fitbit.prototype.onRequest = function(req, res) {
self.emit("auth", req, res, {
token: oauth_access_token,
secret: oauth_access_token_secret,
- id: results.user_id,
+ id: results.encoded_user_id,
data: results
})
}
View
5 lib/services/linkedin.js
@@ -12,7 +12,8 @@ function LinkedIn(options) {
this.id = options.id
this.secret = options.secret
this.scopes = options.scopes || ["r_basicprofile"]
-
+ this.fields = options.fields || ["id", "first-name", "last-name", "industry", "headline"]
+
this.on("request", this.onRequest.bind(this))
}
@@ -62,7 +63,7 @@ LinkedIn.prototype.onRequest = function(req, res) {
if (error) return self.emit("error", req, res, uri.query)
oa.getProtectedResource(
- "http://api.linkedin.com/v1/people/~:(id,first-name,last-name,industry,summary,specialties,skills,projects,headline,site-standard-profile-request)?format=json",
+ "http://api.linkedin.com/v1/people/~:(" + self.fields.join(',') + ")?format=json",
"GET",
oauth_access_token,
oauth_access_token_secret,
Something went wrong with that request. Please try again.