curl LinkedIn API [英] curl LinkedIn API

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

问题描述

我通过 Python 获取了 LinkedIn API 的 oauth 令牌和 oauth 令牌密钥.我现在想通过 curl 进行一些 REST 调用,我尝试了以下操作;

I obtained the oauth token and oauth token secret for the LinkedIn API via Python. I'd like to make some REST calls via curl now and I tried the following ;

curl -v "http://api.linkedin.com/v1/people/~" -d "oauth_token=xxxxxxxxxx" -d "oauth_token_secret=xxxxxxxxxxxxx"

我在 Python 中使用了 LinkedIn API,但想在 curl 中使用.我在这里错过了什么吗?在这方面的任何建议将不胜感激.感谢您的帮助.

I've used the LinkedIn API in Python but wanted to use in curl. Am I missing something here ? Any suggestions in this regard will be highly appreciated. Thank you for your help.

推荐答案

您需要使用 OAuth 对请求进行签名 - 通常最好的方法是使用库(就像您提到的,python 库运行良好).您可以抓取 HTTP 流量以查看正在发送的其他标头.http://developer.linkedin.com 上的开发者门户有 OAuth 内容的概述,但它会获得 Curl 的有效实现非常困难,因为您生成的每个签名都会不同(基于时间戳).

You need to sign the requests using OAuth - usually the best way to do this is to use a library (like you mentioned, the python library works well). You can scoop the HTTP traffic to see what additional headers are being sent. The developer portal at http://developer.linkedin.com has an overview of the OAuth stuff, but it'd be pretty tough to get a working implementation for Curl because each signature you generate will be different (based on timestamp).

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

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