使用龙卷风 LinkedinMixin 和 JSON 内容的 Linkedin Share Api
我正在使用龙卷风网络服务器,并将 linkedin 集成到我的应用程序中,我使用的是 LinkedinMixin 类,该类是我从 github 中的非官方代码添加到框架中的。一切工作正常,但我希望能够使用共享 api
POST http://api.linkedin.com/v1/people/~/shares
linkedin API 采用 XML 格式,这就是为什么有时很难将其集成到龙卷风中的原因
https://developer.linkedin.com/documents/api-requests-json
我发现这篇文章告诉我发送
{ "contentType":"linkedin-html", "body":"我喜欢的更新" }
发布更新,但它向我发送 HTTP 401: 未经授权的获取 http: //api.linkedin.com/v1/people/~/shares?...
我想知道是否有人知道 linkedinMixin 的另一个版本: https://github.com/facebook/tornado/pull/236/files
如果有人能给我一个使用 JSON 的共享 API 的完整示例,
谢谢,
I'm using tornado web server and to integrate linkedin in my application I'm using the LinkedinMixin class that I add to the framework from an unofficial code in github. All is working perfectly, but I would like to be able to use the share api
POST
http://api.linkedin.com/v1/people/~/shares
The linkedin API is in XML, this is the reason why it's sometimes difficult to integrate it in tornado
https://developer.linkedin.com/documents/api-requests-json
I found this article which tell me to send
{
"contentType":"linkedin-html",
"body":"My Fancy Update"
}
to post an update but it sends me a HTTP 401: Unauthorized fetching http://api.linkedin.com/v1/people/~/shares?...
I would like to know if someone knows another version of linkedinMixin that this one :
https://github.com/facebook/tornado/pull/236/files
And if someone could give me a complete example of share API using JSON
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可能应该指出,我没有使用 LinkedIn API 或 Tornado 网络服务器的经验。不过,我已经使用 OAuth、JSON 和 XML 做了很多工作。
从您提到的类来看,它们
完全符合您的要求。无需费心请求 JSON 等。它会为您完成。
我还没有真正分析过这些类,但我假设你的回调看起来像:
我希望这为你指明了正确的方向:-)
I should probably point out that I have no experience with the LinkedIn API or the Tornado webserver. I have done a lot of work with OAuth, JSON and XML though.
Judging by the class you mentioned, the
does exactly what you want. No need to bother about requesting JSON, etc. It does it for you.
I haven't really analyzed the classes, but I'd assume that your callback would look something like :
I hope that this pointed you in the right direction :-)