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

查看:18
本文介绍了仅使用 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天全站免登陆