Comments (5)
Hi @hafeez1042,
it works identically as other Meteor native login packages - Google, Facebook, etc.
from meteor-accounts-linkedin.
I can't get this to work:
if (Meteor.isClient) {
Accounts.ui.config({
requestPermissions: {
linkedin: ['iindustry'],
},
});
}
if (Meteor.isServer) {
Meteor.startup(function() {
ServiceConfiguration.configurations.remove({});
ServiceConfiguration.configurations.insert({
service: "linkedin",
clientId: "774nha79etnktx",
secret: "l6ZbFEDQ2D0hENo1",
requestPermissions: ['industry']
});
});
}
but my terminal just outputs:
W20151117-15:23:00.519(-5) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20151117-15:23:00.522(-5) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20151117-15:23:00.523(-5) (oauth_server.js:398) Error in OAuth Server: invalid_scope
It does this no matter which fields I request...
from meteor-accounts-linkedin.
On further inspection, this works fine with:
Accounts.ui.config({
requestPermissions: {
linkedin: ['r_basicprofile'],
},
});
but doesn't work passing in something like ['industry']
. How do I access these fields: https://developer.linkedin.com/docs/fields/basic-profile ?
from meteor-accounts-linkedin.
First of all, you need to get the access token, so you need to login.
Then you can test out this snippet:
var user = Meteor.user();
var accessToken = user.services.linkedin.accessToken;
// http://developer.linkedin.com/documents/profile-fields
var basicProfileFields = ['first-name', 'last-name', 'maiden-name', 'formatted-name', 'phonetic-first-name',
'phonetic-last-name', 'formatted-phonetic-name', 'headline', 'location',
'industry', 'num-connections', 'num-connections-capped', 'summary',
'specialties', 'positions', 'picture-url', 'picture-urls::(original)', 'site-standard-profile-request'],
emailFields = ['email-address'],
fullProfileFields = ['last-modified-timestamp', 'proposal-comments', 'associations', 'interests', 'publications',
'patents', 'languages', 'skills', 'certifications', 'educations',
'courses', 'volunteer', 'three-current-positions', 'three-past-positions', 'num-recommenders',
'recommendations-received', 'following', 'job-bookmarks', 'suggestions', 'date-of-birth'],
contactInfoFields = ['phone-numbers', 'bound-account-types', 'im-accounts', 'main-address', 'twitter-accounts', 'primary-twitter-account'];
var requestUrl = 'https://api.linkedin.com/v1/people/~:(' + _.union(basicProfileFields, emailFields, fullProfileFields, contactInfoFields).join(',') + ')';
var response = HTTP.get(requestUrl, {
params: {
oauth2_access_token: accessToken,
format: 'json'
}
});
if (response) {
console.log(response);
}
from meteor-accounts-linkedin.
Got that working, thanks! I think what I'll do is just make this request when accounts are created on the server side and add them to the profile.
from meteor-accounts-linkedin.
Related Issues (20)
- invalid redirect_uri. This value must match a URL registered with the API Key. HOT 6
- Name or email not showing, in UI. HOT 4
- OAuth Sever Error HOT 2
- linked in picture url HOT 1
- Error: No matching login attempt found HOT 1
- Unable to start meteor after pauli:accounts-linkedin HOT 3
- "loginWithService is not a function" @2.0.0 HOT 5
- There is an extra notice showing even when not needed HOT 1
- How to get access-token after login into the linkedin?
- Having difficulties using Meteor 1.6.1 HOT 6
- Package displaying in browser inspector credentials of login HOT 1
- LinkedIn drops OAuth 1 HOT 4
- Create option in configuration to return cleaned up data
- Option to ignore getImage function HOT 4
- Bad data on login HOT 1
- Error in OAuth Server: unauthorized_scope_error HOT 3
- Destructuring options parameter in linkedin-client when it's null or undefined HOT 1
- The passed in client_id is invalid "undefined" HOT 1
- Package doesnt work on Meteor 2.3.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-accounts-linkedin.