有没有一种方法可以使用iframe或javascript在我们的网站中显示我们的linkedin个人资料的最新更新

时间:2018-10-19 01:29:36

标签: javascript html iframe linkedin linkedin-api

我正在为我们公司的网站构建一个.net Web应用程序。并且我们已经有我们公司的linkedin资料,并且我们总是将更新添加到我们的linkedin资料中,如下所示:-

enter image description here

但是我是否可以在我们的网站中显示这些最新更新?我可以使用iframe或javascript这样做吗?当然,我不想将整个linkedin个人资料页面嵌入我们的网站内,我只需要“最近更新”?

2 个答案:

答案 0 :(得分:0)

您可以使用linkedin API在网页中显示它们

https://developer.linkedin.com/docs/rest-api

答案 1 :(得分:0)

“最近更新”页面是否具有唯一的URL?

也就是说,是否存在该页面的URL,无论他们是否登录Linkedin,都可以将其带到最新更新,您可以在地址栏中输入并始终获得该页面的URL?

如果存在,则将iframe添加到页面中,然后将URL指定为iframe的源。您应该会得到想要的页面-如果有一个恒定的URL将您带到那里。

您可以显示iframe中任何域的任何页面-安全问题是您的页面无法与iframed页面进行交互或从中获取信息。

听起来您只想显示页面-对吗?

您唯一无法进入iframe的页面是作者编写了一些JavaScript来查看页面是否在不希望在iframe中显示时是否正在iframe中加载iframe。

然后他们将页面重新加载到浏览器窗口中,以使页面占据整个浏览器窗口。换句话说,如果所有者不希望将其页面显示在iframe中,则代码会转到另一个网站上的页面。

如果确实将来自另一个域的页面放入您网站上的iframe,请确保将其清楚地标记为来自另一个网站的页面-否则,您可能似乎想暗示iframed页面是其中之一您的页面。

这是我用来破坏某人的iframe的代码:

if (top != self) {
     alert("Breaking out of Alien Frameset!\n\n" +
          "Someone is trying to load one of the pages from my website into a frame on their website.\n\n" +
          "This is akin to theft in that it appears that my page is part of their web site. I do " +
          "not grant permission for my pages, or images, to be used in that way. \n\n" +
          "It could be you got here via an image search with Google, Yahoo, Bing, etc. The way they display images makes many people think the images are on the " +
          "search site and makes it simply too easy to copy the images. If you want to view my images, which are all copyright protected, I want you to view them " +
          "on my website.\n\n" +
          "I will now take you to this page on my web site. Please enjoy the site as it was intended to be viewed.")
     top.location.replace(self.location)
}