【发布时间】:2013-07-29 08:45:38
【问题描述】:
我想从我的 Google Chrome 扩展程序的后台页面发送直接消息。
我阅读了 twitter 文档,但似乎没有一个简单的解决方案。
以前有人这样做过吗?到目前为止,我已尝试使用此 API https://dev.twitter.com/docs/api/1.1/post/direct_messages/new 使用 AJAX 调用发送消息,但出现错误 400。
$.ajax({
type: "POST",
url: "https://api.twitter.com/1.1/direct_messages/new.json",
data: {'text': 'Hello World', 'screen_name':'John'}
}).done(function( res) {
console.log(res);
});
【问题讨论】:
标签: javascript jquery google-chrome-extension twitter