问题描述
我的工作涉及抓取Twitter数据信息,解析它的一个项目,并在我们的网站进行管理的目的显示它。我们也正在研究通过与Twitter的REST API联动的网络界面发布Twitter或更新,但要开始,我想做简单的GET。我试图做经由dev.twitter.com的API文档我home_timeline之一,我在我的数据响应得到一个400错误请求错误。这是ColdFusion的code我使用来执行GET(实际codeS安全删除):
I'm working on a project involving grabbing twitter data info, parsing it, and displaying it on our website for administration purposes. We're also looking into posting tweets or updates via a web interface interlocked with the Twitter REST API, but to start off, I wanted to do simple GETs. I'm trying to do one of my home_timeline via the API documentation on dev.twitter.com, and I'm getting a 400 Bad Request error in my data response. This is the ColdFusion code I'm using to execute that GET (actual codes removed for security):
<cfhttp url="https://api.twitter.com/1.1/statuses/home_timeline.json" method="get" result="thisGet">
<cfheader name="oauth_consumer_key" value="*ConsumerKeyCode*">
<cfheader name="oauth_nonce" value="*NonceCode*">
<cfheader name="oauth_signature" value="*SignatureCode*">
<cfheader name="oauth_signature_method" value="HMAC-SHA1">
<cfheader name="oauth_timestamp" value="1349816229">
<cfheader name="oauth_token" value="*TokenCode*">
<cfheader name="oauth_version" value="1.0">
<cfhttpparam name="username" value="*TwitterUserName*" type="formfield">
<cfhttpparam name="password" value="*TwitterPassword*" type="formfield">
</cfhttp>
谁能告诉我,我做错了什么吗?谢谢!
Can anyone tell me what I'm doing wrong here? Thanks!
更新:改变home.timeline到home_timeline
UPDATED: Changed home.timeline to home_timeline.
推荐答案
我什么都不知道Twitter的API,但是从谷歌上搜索2分钟的,我看到了很多引用了 home_timeline
,并没有为 home.timeline
。你确定你有这个权利?
I know nothing about the Twitter API, but from 2min of googling, I'm seeing a lot of references to home_timeline
, and none for home.timeline
. Are you sure you've got that right?
这篇关于ColdFusion的Twitter的API请求无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!