<img height="1" width="1" style="display: none" src="https://www.facebook.com/tr?id=976470819114134&amp;ev=PageView&amp;noscript=1">

Confluence Embed LinkedIn Company Feed


A common request our Atlassian experts receive is for the ability to embed a feed of their LinkedIn Company Updates into Confluence. For example, it is the area on a LinkedIn Company Page that looks like this:



But at the time of writing (October 2016), LinkedIn does not provide an easy way to embed the Company Updates Feed into another website. IFrames aren't really an option due to the "X-Frame-Origin: Same Origin" header being set on the LinkedIn site and there's no widget provided to achieve this functionality.

But there is a workaround solution.... 

Finding your Feed URL

As we did some exploring in the Network tab, it revealed a URL that returns the Company Updates feed. Example:

Feed URL
https://www.linkedin.com/biz/16352/feed?start=0&v2=true

By changing out the company identifier (16352 in this case) for that of another company will return their feed. You can find the company identifier by going to the company page and looking at the URL.

For example, GLiNTECH's company identifier can be seen as 16352 in the URL shown in the screenshot below:


Embedding and Styling the Feed

Once you have the URL for your company's feed, insert a "HTML Include" macro into a Confluence page with the feed URL.




To style the feed (it's ugly by default), we'll include a "HTML" macro that we can place some CSS inside.

The following is an example set of CSS rules to clean up the widget:
 

<style>
div.conf-macro.output-block input, .feed-item-meta, .comments {
display:none;
}
.share-object img {
max-width:300px;
}
.annotated-body {
font-size: 1.5em;
}
.paging-url, .feed-item {
list-style:none;
}
.feed-item {
padding:10px;
}
</style>

Save the page with your two macros (HTML Include and the HTML macro for styling) and you'll have yourself a LinkedIn feed widget that should look something like the following...



If you still have any questions, fee free to leave a comment below and one of our Atlassian Experts will be happy to assist.