Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linkedin new version #147

Open
jramirezgranada opened this issue Dec 29, 2017 · 14 comments
Open

Linkedin new version #147

jramirezgranada opened this issue Dec 29, 2017 · 14 comments

Comments

@jramirezgranada
Copy link

Do you have an update for the new v2 linkedin version ?

Thanks

@Nyholm
Copy link
Member

Nyholm commented Dec 29, 2017 via email

@jramirezgranada
Copy link
Author

We want to delete posts, here de documentation vor v2 https://developer.linkedin.com/docs/guide/v2/shares/share-update-and-delete-api#delete but we can't do it with v1,

@Nyholm
Copy link
Member

Nyholm commented Jan 2, 2018 via email

@DavidGoodwin
Copy link

I found it necessary to remove the line that adds ?format=json onto the URL to talk to the ads api. ( https://github.com/Happyr/LinkedIn-API-client/blob/master/src/LinkedIn.php#L161 )

@mfn
Copy link

mfn commented Feb 21, 2018

Sorry to jump in off-topic here. I discovered their v2 but outside their documentation center there isn't much to find (in terms of questions, chatter, etc.). Do you know how "new" it is, i.e. when it was launched or something? Just curious.

@DavidGoodwin
Copy link

It's still pretty new (and their documentation is pretty naff in general).

From a hazy memory, I think we have to migrate from v1 to v2 sometime this year (August?).

There's https://developer.linkedin.com/docs/guide/v2

@scottybo
Copy link

@DavidGoodwin did you ever find a permanently solution for this? We're in the same position

@DavidGoodwin
Copy link

permanent solution to what? this client not supporting v2? (we wrote a custom guzzle based client for talking to the v2 api ... so I'm not using this client).

@mfn
Copy link

mfn commented Apr 22, 2018

Same here; simply using Guzzle and manually calling the endpoints.

@scottybo
Copy link

scottybo commented May 3, 2018

@mfn @DavidGoodwin would it be possible to share some code examples for others in the same situation? It would be hugely appreciated ☺️

@mfn
Copy link

mfn commented May 3, 2018

There's not much to share, really. Just look at the API docs and fire up a guzzle request.

@scottybo
Copy link

@mfn @DavidGoodwin This is completely the wrong place to ask, but just wanted to pick your brains if that's ok? We're rolling out our own client (a forked version of this client) and the new urn structure seems very clunky. Do you know if there's a more elegant way than this to get a profile picture?

$user = $linkedIn->get('/v2/me?projection=(id,localizedFirstName,localizedLastName,vanityName,profilePicture(displayImage~:playableStreams))');
$profile_picture = $user['profilePicture']['displayImage~']['elements'][0]['identifiers'][0]['identifier'];

Having to delve so deep into an associative array to get the URL of a media file seems like madness.

@mfn
Copy link

mfn commented Jun 21, 2018

@scottybo I don't fetch profile data but of companies and it looks similar but not as "complex":

$query = [
    'projection' => '(paging,elements*(*,organizationalTarget~(id,localizedName,logo(original))))',
    …
];
$result = $this->get(static::API_V2_URI . '/organizationalEntityAcls', $headers, $query);

foreach (…) {
  … = $result[$index]['organizationalTarget~']['logo']['original'];
}

🤷‍♀️

@scottybo
Copy link

Thanks - your projection route with stars answers some of the questions I had about that which aren't covered in the docs, so that's a big help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants