2

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!

UPDATED: Changed home.timeline to home_timeline.

user1100412
  • 699
  • 1
  • 10
  • 22

1 Answers1

3

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?

Adam Cameron
  • 29,677
  • 4
  • 37
  • 78
  • This seems to be the issue https://dev.twitter.com/docs/api/1/get/statuses/home_timeline – Lucas Oct 10 '12 at 06:22
  • Adam & Lucas you are right I had the function wrong, it is home_timeline. However, I still have the same issue. Lucas, that method you sent me to does work, but it's an OLD version of the API that is about to be deprecated and no longer available. So I need this json version to work, and yet it is still not, even with the correct home_timeline name. Can anybody help? – user1100412 Oct 10 '12 at 14:39
  • As I look deeper into the response, I'm getting a 215 Bad Authentication Data response. Yet, I'm copying and pasting the exact codes needed for the authentication to work. Do I need to encode them somehow? How should I submit them to the http request? – user1100412 Oct 10 '12 at 14:55