工作示例 Coldfusion 和 Linkedin API [英] Working example Coldfusion and Linkedin API

查看:14
本文介绍了工作示例 Coldfusion 和 Linkedin API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人设法让 LinkedIn API 在 Coldfusion 应用程序中工作?Linkedin 开发者社区中有一些线程,但缺少任何实际工作示例或完整代码.

Has anyone managed to get the LinkedIn API working from within a coldfusion application? There are some threads in the Linkedin Developer's community, but any actual working examples or complete code are missing.

最后,我正在寻找一种解决方案,将 LinkedIn 个人资料导入我们的招聘解决方案 - 并定期获取更新的个人资料 - 当然是在用户允许我们访问他/她的个人资料之后.

In the end I'm looking for a solution to import LinkedIn profiles to our recruitment solution - and also fetch updated profiles regularly - ofcourse after the user gives us access to his/her profile.

感谢任何帮助,尤其是在某种工作设置(即使只是基本的)

Any help appreciated, especially with some kind of working setup (even if only basic)

推荐答案

由于 ColdFusion 可以创建和使用 Java 对象,因此最简单的解决方案是使用 Java API 访问 LinkedIn.一种选择是 linkedin-j.

Since ColdFusion can create and use Java objects, the easiest solution is to use a Java API to access LinkedIn. One option is linkedin-j.

我还没有找到任何基于 CF 的包装器的证据,所以很遗憾,您将不得不弄清楚这部分.

I haven't found any evidence of a CF-based wrapper so unfortunately you're going to have to figure this part out.

您无需真正了解 Java 的工作原理即可在 ColdFusion 中使用 Java 对象;您只需要知道相关 API 中的类是什么,然后创建必要的对象,然后调用相关函数.我假设 linkedin-j 提供了某种 .jar 文件.您需要将其添加到类路径中;关于如何做到这一点(如果该链接断开,只需搜索 coldfusion jar classpath).然后,找出您需要的对象,使用 CreateObject 创建您需要的该对象的实例.

You don't need to really know how Java works to use Java objects in ColdFusion; you just have to know what the classes are in the API in question and then create the necessary objects and then call the relevant functions. I assume linkedin-j offers some kind of .jar file. You need to add that to your classpath; there are plenty of resources on line on how to do this (if that link breaks, just search for coldfusion jar classpath). Then, figure out which object you need, create an instance of that object you need using CreateObject.

入门页面 讨论了 LinkedInApiClientFactory 对象.你可以通过做类似的事情在 ColdFusion 中创建它

The getting started page talks about a LinkedInApiClientFactory object. You'd create this in ColdFusion by doing something like

<cfset factory = CreateObject('com.google.code.linkedinapi.client.LinkedInApiClient').newInstance(consumerKeyValue, consumerSecretValue)>
<cfset client = factory.createLinkedInApiClient(accessTokenValue, tokenSecretValue)>

此时您可以使用 LinkedInApiClient 可用的所有函数,例如 getProfileByUrl.

At which point you can use all of the functions available to the LinkedInApiClient, such as getProfileByUrl.

使用linkedin-j 站点上提供的文档了解您可以在LinkedInApiClient 上调用的函数,并从那里开始工作.

Use the documentation available at the linkedin-j site to find out about the functions you can call on the LinkedInApiClient, and work from there.

这篇关于工作示例 Coldfusion 和 Linkedin API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆