Fastest way to load many LinkedIN profile widgets

我是研究僧i 提交于 2019-12-12 04:14:00

问题


For a member overview I've resorted to loading all their LinkedIN profiles using the LinkedIN Member Profile Plugin. I've once loaded the required javascript:

<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>

After which I'm looping through the members, generically loading their profiles:

<script type="IN/MemberProfile" 
    data-id="<?php echo $linkedin; ?>" 
    data-format="inline" data-related="false"></script>

Where $linkedin is a string to their profile.

This works, but is tediously slow, due to there being around 40 members. Is there a way to cache the result, or make this work faster?


回答1:


This works, but is tediously slow, due to there being around 40 members. Is there a way to cache the result, or make this work faster?

No, not really. Those plugins load in an iframe, so you have no JS access to the content.

But those plugins are not really meant to be used in multitudes on a single page either. If you want “faster”, then you will have to go via their API and get the member details/profile pictures that way, so that you can store them into your system and then serve them from there.



来源:https://stackoverflow.com/questions/45734634/fastest-way-to-load-many-linkedin-profile-widgets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!