Skip to content

Conversation

ivikash
Copy link
Contributor

@ivikash ivikash commented Aug 13, 2013

So for now just the LinkedIn button is added and name is being fetched. It can be tested in localhost as of now.

Its a work is progress and not baked enough to be merged.

@ivikash
Copy link
Contributor Author

ivikash commented Aug 14, 2013

@msporny Can you please once try this locally and let me know any immediate changes required at this stage. As discussed over the meeting, it has tabs to display json and context and by default displays json-ld.

Currently a Work in progress

Few issues I am facing is, because of the linkedIn Api, in console I am getting

  • Blocked a frame with origin "https://api.linkedin.com" from accessing a frame with origin "http://localhost:8080". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
  • Blocked a frame with origin "https://platform.linkedin.com" from accessing a frame with origin "https://platform.linkedin.com". The frame being accessed set "document.domain" to "linkedin.com", but the frame requesting access did not. Both must set "document.domain" to the same value to allow access.

And I am unable to find a solution for that.

Also, I think the different api keys issues has been solved as I have added the necessary JavaScript API Domains in LinkedIn Application portal, on their site. Also I have added @lanthaler @gkellogg along with you.

@msporny
Copy link
Member

msporny commented Aug 15, 2013

Alright, I tried it locally and pulling of data from LinkedIn seems to work. I can sign in and it shows valid JSON-LD data after I sign in. The page needs to explain what the tool is used for in a way that is accessible to an average person. You want to explain that the app can be used to export their LinkedIn profile to JSON-LD, which can then be uploaded to their personal website. We may even want to take the JSON-LD and feed it into an HTML template that will then generate an HTML+RDFa+JSON-LD file for them to put on their website.

You also want to pull as much data out of LinkedIn as possible. Get everything they'll give you.

This is a good start. Now you need to focus on explaining what the tool does and getting as much data as possible from LinkedIn.

The errors your hitting are due to the Cross Origin protections placed on the LinkedIn API key. There is no way to get around them (as that would defeat the purpose of the protection mechanism). It's fine the way it is - the live site won't have the issues you're seeing.

The ideal way to do the translation that you're doing isn't to hard code it like you have. It's to provide a JSON-LD context for the JSON you get back from LinkedIn, and then use the JSON-LD library's .compact() method to convert the LinkedIn data to schema.org data.

@gkellogg
Copy link
Member

gkellogg commented Mar 2, 2017

This PR is languishing, we should either commit to close.

cc/ @msporny @davidlehn @dlongley @lanthaler.

@gkellogg
Copy link
Member

Closing without prejudice, feel free to re-open a new PR, but please make it a clean single-commit change.

@gkellogg gkellogg closed this Jul 10, 2017
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

Successfully merging this pull request may close these issues.

3 participants