java - 了解 Twitter API

标签 java api twitter

我正在解决一个java问题(至少正在尝试)利用twitter API,但是,这是我使用任何类型的API的第一个项目,我有点困惑。为 Twitter API(例如 Twitter4J)使用 Java 库有什么好处?如果不使用 Java 库,又会如何呢?我对一般 API 主题有点模糊,并且在我的搜索中没有找到任何真正清楚如何使用 API 的内容。我是否需要使用 Java 库,或者我可以在没有 Java 库的情况下使用它吗?使用 1 与不使用 1 的优点和缺点是什么。我对此比较陌生,并且遇到了一些问题。有什么帮助吗?

最佳答案

首先什么是 API:

An application programming interface (API) is a particular set of rules ('code') and specifications that software programs can follow to communicate with each other. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers. An API can be created for applications, libraries, operating systems, etc., as a way of defining their "vocabularies" and resources request conventions (e.g. function-calling conventions). It may include specifications for routines, data structures, object classes, and protocols used to communicate between the consumer program and the implementer program of the API

使用 Twitter4J API 可以让您轻松调用执行复杂操作的命令,例如在推文传入时获取推文。对于此类项目,使用 API 是按您的方式进行操作的最佳方式还需要获取允许您使用 API 的访问 key 。

使用 Twitter4J 的示例:http://twitter4j.org/en/code-examples.html

关于java - 了解 Twitter API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7745765/

相关文章:

python-3.x - 如何制作twitter的网络图(Python3)

php - 有什么方法可以从 Twitter 上获取引用的 t.co 链接吗?

java - 使用 JXPath 查询列表

java - 使用 Ascii 字符代替 Char

php - 使用 json 从 IMDB 获取数据

javascript - 客户端服务器javascript通信

javascript - Twitter Bot Node.js 和 Twit 包

java - 使用snakeYaml解析字符串数组

java - 实现 Spring Controller 的单元测试时缺少依赖项 hasSize() 和 hasProperty()

xml - 我怎样才能获得与艺术家关联的所有 musicbrainz id?