Twitter API:代表谁发帖? [英] Twitter API: post on behalf of whom?

查看:28
本文介绍了Twitter API:代表谁发帖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 Twitter API,以便我的程序可以发布一些推文.要使用它,我必须在开发中心注册应用程序并获取一些参数,如消费者密钥"、消费者秘密"等.然后我可以使用 REST API 或一些库,如 twitter4j - 好吧,这很简单.

I want to use Twitter API so my program can post some tweets. To use it I have to register application in dev-center and get some parameters like "Consumer key", "Consumer secret" etc. Then I can use either REST API, or some libraries like twitter4j - OK, that's simple.

但问题是:谁将成为此类推文的作者"?或者,换句话说,发布后我在哪里可以找到它们?它们是由应用程序发布还是由某个用户发布?我真的无法弄清楚特定用户如何绑定到注册的 API 应用程序......或者我如何指定(登录")用户代表发布推文?

But the question is: who will be the "author" of such tweets? Or, in other words, where can I find them after posting? Will they be posted by application or by some user? I can't really figure out how particular user binds to registered API-application... Or how can I specify ("log-in") user to post tweet on behalf of?

推荐答案

作者"将始终是身份验证用户.来自 Twitter API 文档状态/更新:

The "author" is always going to be the authenticating user. From the Twitter API documentation for statuses/update:

更新验证用户的当前状态,也称为推文.

Updates the authenticating user's current status, also known as tweeting.

要回答有关使用其他用户的用户名/密码进行身份验证的其他问题,这是可能的,但您需要获得 Twitter 的许可.您还需要使用 OAuth.查看 Twitter API OAuth 文档.

To answer your other question about authenticating with another user's username/password, it is possible but you need to get permission from Twitter. You also still need to use OAuth. Check out the Twitter API OAuth documentation.

这篇关于Twitter API:代表谁发帖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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