ColdFusion Twitter API 错误请求 [英] ColdFusion Twitter API Bad Request

查看:20
本文介绍了ColdFusion Twitter API 错误请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开展一个项目,该项目涉及获取 Twitter 数据信息、对其进行解析并将其显示在我们的网站上以用于管理目的.我们也在考虑通过与 Twitter REST API 互锁的 Web 界面发布推文或更新,但首先,我想做简单的 GET.我正在尝试通过 dev.twitter.com 上的 API 文档执行我的 home_timeline 之一,并且在我的数据响应中收到 400 Bad Request 错误.这是我用来执行 GET 的 ColdFusion 代码(出于安全考虑删除了实际代码):

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 错误请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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