I would like to get full educations data by using the LinkedIn API but I only get the end-date and id fields as you can see.
[education] => Array
(
[0] => SimpleXMLElement Object
(
[id] => 115254687
[end-date] => SimpleXMLElement Object
(
[year] => 2010
)
)
)
I asked for the r_fullprofile permissions. Do I need any additional permission? Thanks.
When you use r_fullprofile member permission, you get access to the full profile fields of ONLY the authenticated user. You can only retrieve the basic profile fields of the 1st degree connections of the authenticated user as explained in our Connections API doc. There are no member permissions that allow you to access the full profile fields of the connections. This restriction is added to protect the data privacy of users.This issue is not with your code, you are getting what our Linkedin APIs allow.
Read the following link to understand more https://developer.linkedin.com/documents/connections-api
You can find a sample working JS code under following link
http://infinityexist.wordpress.com/2014/10/29/extracting-connection-details-using-linkedin-apis-written-in-javascript/
Related
I want to fetch the Linkedin connections of a user via Auth 2 API. But As per different blogs and information on the internet, I found that I need to get partnered with Linkedin to get the details of Profile.
I need following data for a username, photo, headline, contact information, experience, education, summary, location and connections.
When I try to fetch the data from following APIs
https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,maidenName,phoneticFirstName,phoneticLastName,headline,location,industryName,summary,specialties,positions,profilePicture(displayImage~:playableStreams),vanityName,lastModified,organizations)
Result
API error (403) Not enough permissions to access:
Please help me with the process to fetch the data from Linked API.
Regards
LinkedIn API v2 by default will request the r_liteprofile when performing the authorize URL. this means that the user will only have to allow you to get a limited subset of information with the granted token.
You need to make sure than upon the authorization request ("https://www.linkedin.com/oauth/v2/authorization") you pass a scope parameter that contains the r_basicprofile in order to get the extra data
see https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/migration-faq
also https://developer.linkedin.com/docs/ref/v2/profile/basic-profile for the supported fields
I am working on a registration and login functionality for my webapp.
All registered users have an email and UID in firebase auth db. The UID is used as key in firebase realtime db. The following json structure in firebase realtime db
users
|
|--UID1
|
|---Name:Amanda
|---Surname:Waller
|---age:30
|---email:abc#gmail.com
|--UID2
|
|---Name:MyName
|---Surname:Mysurname
|---age:39
|---email:xyz.aaa#gmail.com
Now I have an admin user who needs to access other users data , for example the admin wants to search and retrieve the user with email xyz.aaa#gmail.com , but the JSON key i have chosen is UID , is there a way for an admin user to get UID based on email id of user?Or should I redesign my db? Using email as key doesn't really seem straight forward given that email can contain special characters as stated in the answer to this question:
Referencing authentication db data in real time db firebase
Your DB structure seems good to fetch data.
There can be multiple approaches to search data.
Download all the users and save it in memory and when admin searches the email id then you can search on local storage and get uID.
Don't forget to add a childListener when new user is added so you have to update the local user list
You can use firebase API to fetch only the particular record with specified value like:
\
firebaseDB
.ref("Users")
.orderByChild("email")
.equalTo("xyz.aaa#gmail.com")
.once('value')
.then((snapshot) => {
//Received Snapshot
})
.catch(er => console.log(JSON.stringify(er)));
In 2nd Approach you will need to index the email value in firebase database rules and need to search only when admin has entered full email id.
Thanks
I am Using WordPress rest API with OAuth 1. When i try to Fetch users list using wp-json/wp/v2/users/ I only get Admin user detail, not all users. I have completed OAuth authentication process ang got oauth token and secret. I have tried POST man as well REST client for Mozilla. Also i get "rest_cannot_create" when trying to create any POST or User.
you will want to make sure that the users you want to appear have the "list_users" capability.
// get the the role object
$role_object = get_role( $role_name );
// add $cap capability to this role object
$role_object->add_cap( $capability_name );
https://developer.wordpress.org/plugins/users/roles-and-capabilities/#adding-capabilities
We use the LinkedIn API to list companies that a user admins.
We have our App set to get r_fullprofile and rw_company_admin when the user grants permission.
We're trying to list all of the companies the user has admin access to via:
http://api.linkedin.com/v1/companies:(id,name,square-logo-url)?is-company-admin=true
<error>
<status>403</status>
<timestamp>1432323149224</timestamp>
<request-id>XXXXXXXXXX</request-id>
<error-code>0</error-code>
<message>Member [user id] does not have permission to get companies as admin.</message>
</error>
According to the Manage Company Pages docs, as long as we have the rw_company_admin scope, we should be able to call this endpoint.
I've read through the Developer Program Transition docs (https://developer.linkedin.com/support/developer-program-transition) but it doesn't seem to affect this usage of the API.
ETA: This has been flagged as a possible duplicate of LinkedIn API unable to view _any_ company profile
That question is about fetching details for a single company (which the user may or may not administrate). My question is about listing companies that the user specifically does administrate.
According to new api changes user should be administrator of target company. Read this .
All calls to Companies API endpoints will require the authenticated user to be flagged as an administrator of the LinkedIn Company Page that is the target of the API call. You become the administrator of a page when you create it. If the page already exists, you will have to contact the existing administrator to grant admin access to other LinkedIn members.
I faced the same problem and the problem was with the initial authorization code. You should mention the scope=rw_company_admin while doing the initial redirect URL call. Something like this -
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=your_client_id&redirect_uri=https%3A%2F%2Fwww.google.com/&state=12345&scope=rw_company_admin%20r_emailaddress%20w_share%20r_basicprofile
What's the importance of the facebook offline_access permission?
What it is useful for while the application can for example post to the user wall even if he is not logged in (of course after he once allowed access to the application without the offline_access permission).
Thanks.
With the Facebook PHP SDK, you ask for the offline_access permission when generating the login link :
$args['scope'] = 'offline_access';
$loginUrl = $facebook->getLoginUrl($args);
echo 'Login with Facebook';
Then you can make API calls with that token :
require "facebook.php";
$facebook = new Facebook(array(
'appId' => YOUR_APP_ID,
'secret' => YOUR_APP_SECRET,
));
$facebook->setAccessToken(USER_ACCESS_TOKEN);
$facebookdata = $facebook->api('/me');
The offline_permission allows you to make API calls with the token, even when the user has logged out.
Hope that helps !
Facebook Permissions:
Enables your app to perform authorized
requests on behalf of the user at any
time. By default, most access tokens
expire after a short time period to
ensure applications only make requests
on behalf of the user when the are
actively using the application. This
permission makes the access token
returned by our OAuth endpoint
long-lived.