jQuery 和 OpenSocial(特别是 Orkut)
我想开发一个网页,使用 OpenSocial API 从我的 Orkut 帐户获取一些数据。我使用的语言是 JavaScript,并且使用 jQuery。然而我必须承认,就 JavaScript 而言,我是一个新手。
我查看了 OpenSocial jQuery。它似乎仅限于小工具,并且 jOpenSocial 缺乏任何好的文档,并且似乎无法处理 OAuth。您能否推荐一个易于使用的 JavaScript 库作为 OpenSocial 的包装器?
I want to develop a webpage which fetches some data from my Orkut account using OpenSocial APIs. The language I am working with is JavaScript and I use jQuery. However I must admit that I am a novice as far as JavaScript is concerned.
I have looked at OpenSocial jQuery. It seems restricted to gadgets and jOpenSocial lacks any good documentation and does not seem to be handling OAuth. Can you suggest a JavaScript library which is easy to use as a wrapper around OpenSocial?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来 opensocial-jquery 可以满足您的大部分需求。它不仅限于小工具(这是一个获取人员示例:http://code. google.com/p/opensocial-jquery/wiki/ExamplePerson),它包装了 gadgets.io.makeRequest,这使得 AJAX 功能能够工作。
我不确定“处理 OAuth”是什么意思 - 您不需要在实现 OAuth 方面做太多事情。 iGoogle 中有一项名为 OAuth 代理的功能,但 opensocial-jquery 也支持该功能:http://code.google.com/p/opensocial-jquery/wiki/ExampleFriendFeedOAuth(似乎是日语,但示例代码很容易理解)。
It looks like opensocial-jquery will satisfy most of what you need. It's not limited to gadgets (here's a fetch person example: http://code.google.com/p/opensocial-jquery/wiki/ExamplePerson) and it wraps gadgets.io.makeRequest, which allows the AJAX functions to work.
I'm not sure what you mean by "handling OAuth" - you shouldn't need to do much in the way of implementing OAuth. There is a feature called the OAuth proxy in iGoogle, but opensocial-jquery supports that as well: http://code.google.com/p/opensocial-jquery/wiki/ExampleFriendFeedOAuth (appears to be in Japanese but the sample code is easy enough to understand).