仅使用JQuery更新Twitter(OAuth) [英] Using only JQuery to update Twitter (OAuth)

查看:92
本文介绍了仅使用JQuery更新Twitter(OAuth)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们希望向twitter发送JSON更新命令,但仅使用JQuery,而不必转到网络服务器并用PHP完成.

we would like to send a JSON update command to twitter, but only using JQuery, not having to go to the webserver and have it done in PHP.

我真正无法掌握的是如何在JQuery/JSON twitter API调用中发送用户凭证.我们的用户凭据来自Twitter的OAuth.

The thing I can't grasp really is how to send the user credentials in the JQuery/JSON twitter API call. Our user credentials are from Twitter's OAuth.

谢谢,欢呼!

推荐答案

如果这样做,则必须将应用程序的密钥,秘密(!)和用户的令牌嵌入到网页中(然后向用户公开).我认为这不是一个好主意. (而且折衷的风险是相同的.)

If you did this, you would have to embed your application's Key, Secret (!), and the user's token into the webpage (which is then exposed to the user). I don't think this is a good idea. (And the risk of compromise is the same.)

这可能是大多数其他人的想法-但是,有一个 JavaScript OAuth库.但这并不是为了在网站内部使用(跨域ajax限制),而是为了在其他JS平台(例如Chrome/Jetpack插件或Vista Sidebar小部件)中使用.

This might be the thinking of most other people - however there is a Javascript OAuth library. But it's not inteded for the use inside websites (cross-domain ajax limitation) but rather for other JS platforms (like Chrome/Jetpack plugins or Vista Sidebar widgets).

这篇关于仅使用JQuery更新Twitter(OAuth)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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