Twitter更新到v1.1时,API状态更新无法正常工作 [英] Twitter API status update not working when updating to v1.1

查看:280
本文介绍了Twitter更新到v1.1时,API状态更新无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个twitter应用程序,每当他们发布新的博客项目时,就会自动发送tweets来使用我们的博客应用程序。

I have a twitter application which sends tweets automatically for uses of our blog application whenever they post a new blog item.

此应用程序现在返回错误



This application is now returning an error


HTTP / 1.1 401未授权内容类型:application / json; charset = utf-8 Date:Mon,12 Nov 2012 22:05:27 UTC伺服器:tfe

HTTP/1.1 401 Unauthorized Content-Type: application/json; charset=utf-8 Date: Mon, 12 Nov 2012 22:05:27 UTC Server: tfe

{errors:[{message:Could not验证您,代码:32}]}

{"errors":[{"message":"Could not authenticate you","code":32}]}

我的coldfusion代码如下,发布tweet:

My coldfusion code is as follows for posting the tweet:

<cfset var tweetURL = "https://api.twitter.com/1.1/statuses/update.json">
<cfhttp url="#tweetURL#" method="post" result="result">
    <cfhttpparam type="header" name="Authorization" value="#oauth.header#" encoded="no">
    <cfhttpparam type="formfield" name="status" value="#tweet#" encoded="no">
</cfhttp>

我已经转储了所有的oauth头值,他们都是他们应该的,他们不是返回任何错误。其唯一的状态更新是返回未授权的错误。

I have dumped out all the oauth header values, they are all as they should be, they are not returning any errors at all. its only the status update that is returning the unauthorized error.

我需要检查什么其他事情?我认为我的应用程序可能已被阻止或东西,但它的所有和工作。我已经测试了他们授权应用程式的使用者帐户。

What other things do I need to check? I thought my app may have been blocked or something but its all up and working. I've tested the user accounts they have authorized the app.

推荐答案

我正忙于验证头和auth令牌的输入,我忽略了状态。它不是urlencoded。虽然这显然工作在老版本。它没有通过新的。

I worked it out. I was to busy validating the input of the header and auth tokens etc that I overlooked the status. It wasn't urlencoded. although this apparently worked in the old version. it didn't pass for the new.

这篇关于Twitter更新到v1.1时,API状态更新无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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