Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
铁路超高url编码冒号“:&引用;调用twitter api创建帖子时_Api_Twitter_Httprequest_Twitterapi Python - Fatal编程技术网

铁路超高url编码冒号“:&引用;调用twitter api创建帖子时

铁路超高url编码冒号“:&引用;调用twitter api创建帖子时,api,twitter,httprequest,twitterapi-python,Api,Twitter,Httprequest,Twitterapi Python,我正在尝试创建一条tweet,但如果有冒号,它看起来会失败,在本例中,hello:: https://api.twitter.com/1.1/statuses/update.json?status=hello: this would have been a cool tweet 我还尝试了使用%3A进行百分比编码,但twitter继续给我一个401。移除结肠时,效果良好 有什么想法吗?我最终尝试使用{'Content-Type':'application/x-www-form-urlencod

我正在尝试创建一条tweet,但如果有冒号,它看起来会失败,在本例中,
hello:

https://api.twitter.com/1.1/statuses/update.json?status=hello: this would have been a cool tweet
我还尝试了使用
%3A
进行百分比编码,但twitter继续给我一个
401
。移除结肠时,效果良好


有什么想法吗?我最终尝试使用
{'Content-Type':'application/x-www-form-urlencoded'}在tweet上发布一个时间戳,如
2021年5月1日12:07:21

,解决了我的问题