简体   繁体   English

Linkedin公共资料url memberdata插件

[英]linkedin public profile url memberdata plugin

I am trying to create a company directory which will provide a link to an employees linkedin public profile, if the uses chooses to connect. 我正在尝试创建一个公司目录,如果用户选择连接的话,该目录将提供一个指向员工linkedin公共档案的链接。

So on our employee profile page, the user can choose to link their linkedin account to their employee profile. 因此,在我们的员工资料页面上,用户可以选择将其Linkedin帐户链接到其员工资料。 We initiate an oAuth process and we retrieve their hashed linkedin id, which we then store. 我们启动一个oAuth流程,并检索其哈希的linkedin ID,然后将其存储。 Great. 大。 Now the part that isn't working. 现在,该部分不起作用。

Based on their plugin example, i have this... 根据他们的插件示例,我有这个...

<script type="text/javascript" src="http://platform.linkedin.com/in.js">
    api_key: xxxxxxxxxxxx
    authorize: false
</script>

<script type="text/javascript">
    function INTEST() {
        IN.API.Profile().ids("pU-LBvD_y0")
            .fields(['id', 'firstName', 'lastName', 'picture-url', 'public-profile-url'])
            .result(function (result) {
                profile = result.values[0];
             })
             .error(function (errorResult) {
        var i = 0;
        });;
    }
</script>

I receive all information except the public-profile-url. 我收到除public-profile-url以外的所有信息。

Any help would be greatly appreciated. 任何帮助将不胜感激。

I'm sure you have this figured out by now. 我确定您现在已经知道了。 But for the benefit of others: 但是为了他人的利益:

When using the JavaScript API you must convert the profile field names from the dashed notation to studly caps. 使用JavaScript API时,必须将配置文件字段名称从虚线表示法转换为大写大写字母。 For example first-name becomes firstName. 例如,名字变为firstName。 public-profile-url becomes publicProfileUrl public-profile-url变为publicProfileUrl

Reference the following API documentation at http://developer.linkedinlabs.com/tutorials/jsapi_profile/ http://developer.linkedinlabs.com/tutorials/jsapi_profile/中引用以下API文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM