twitter4j - 如何配置? [英] twitter4j - How to configure?

查看:85
本文介绍了twitter4j - 如何配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 twitter4j 编写一个简单的 twitter 客户端,但我似乎无法通过第一步- 配置参数.网站上有一个 配置页面 说我需要一个 twitter.properties 根目录下的文件,内容如下:

I am trying to write a simple twitter client using twitter4j, but I can't seem to get past the first step - configuring the parameters. There is a configuration page on the site that says I need to have a twitter.properties file at root with following contents:

debug=true
oauth.consumerKey=*********************
oauth.consumerSecret=******************************************
oauth.accessToken=**************************************************
oauth.accessTokenSecret=******************************************

我无法弄清楚的是应该用什么来代替星号,以及如何获得这些值?请帮忙.

What I am unable to figure out is what should go in place of the asterisks, and how do I obtain those values? Please help.

PS:这是我第一次使用 OAuth 和 twitter4j,所以请保持温和!

PS: This is my first time with OAuth and twitter4j, so please be gentle!

推荐答案

登录https://dev.twitter.com 通过您的 Twitter 凭据.

Login to https://dev.twitter.com through your Twitter credentials.

在主页上点击创建应用并填写所有详细信息.您将获得所有必需的密钥/秘密.

And at homepage Click on Create an app and fill all the details . You will get all the required key/secret.

这篇关于twitter4j - 如何配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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