Tools

trm said

trm  

Problems with posting to a channel

5 comments

trm posted to #Qaiku-api 26.06.2009 (en)

5 comments

Bottom

trm  

I tried to send message to a channel using update.json channel -parameter. Does the channel name need # sign at start? With and without it message posting failed. With #-sign, interface returned channel does not exist.

I've created #qaiku-api-testing and tested on that. In addition I tried starting my message with #qaiku-api-testing and it didn't show up on the channel either. I tested also with #testi -channel and it didn't work either.

Without the channel parameters, I can create

Also: Does it matter for the API what Content-Type POST -request is? Ie. x-www-form-urlencoded or maybe multipart/form-data?

Wireshark-log (with channel: #qaiku-api-testing):
POST /api/statuses/update.json HTTP/1.1

Authorization: Basic CENSORED
Host: www.qaiku.com

Accept: /

Content-Length: 78

Content-Type: application/x-www-form-urlencoded

status=My fifth test msg via qaiku-api. Yay&lang=en&channel=#qaiku-api-testing
HTTP/1.0 404 Not Found

Date: Fri, 26 Jun 2009 23:31:29 GMT

Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch Midgard/8.09.3

X-Powered-By: Midgard/8.09.4.99

Allow: GET, POST

Set-Cookie: CENSORED path=/

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

X-MidCOM-Error: Channel #qaiku-api-testing not found

Content-Length: 1791

Connection: close

Content-Type: text/html; charset=utf-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml...
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='fi' lang='fi'>
<head>
<title>Qaiku</title>
<!--
<span tal:replace="php: MIDCOM.head.print_elements()" />
-->
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel='stylesheet' href='/css/style.css' type='text/css' />
<script type="text/javascript" src="/js/jquery-1.2.6.pack.js"></script>
<!-- <script type="text/javascript" src="/js/ui.packed/jquery.ui.all.packed.js"></script> -->
<!-- <script type="text/javascript" src="/js/taconite/jquery.taconite.js"></script> -->
<!-- <script type="text/javascript" src="/js/facebox/facebox.js"></script> -->
<!-- <script type="text/javascript" src="/js/jquery.jgrowl_minimized.js"></script> -->
<script type="text/javascript" src="/js/jcrop/jquery.Jcrop.pack.js"></script>
<script type="text/javascript" src="/js/shadedborder.js" ></script>
<script type="text/javascript" src="/js/qaiku.js"></script>

    <link rel="shortcut icon" href="/midcom-static/midcom_core/midgard/midgard.ico" type="image/vnd.microsoft.icon" />
</head>


<body class="error" tal:attributes="class midcom_core_exceptionhandler/message_type">
<div id='header'>
<div id='header_navi_container'>
<a name='top'></a>
<a href='/' id='header_logo'>
</a>
<div id='header_navi'>
<!DOCTYPE html>
<html>
<head>
<title>HTTP/1.0 404 Not Found</title>
</head>
<body class="midcom_exception_notfound">
<h1>HTTP/1.0 404 Not Found</h1>
<p>Channel #qaiku-api-testing not found
</p>
</body>
</html>

trm commented on posted to #Qaiku-api 26.06.2009 (en)

trm  

@bergie It seems that the channel_timeline doesn't work either. It returns always this for all channel I've tried:

0] => stdClass Object
(
[created_at] => Wed Apr 15 15:26:15 +0000 2009
[id] => 1de29d1c266322e29d111de98150df1d6d32b282b28
[text] => Testi
[source] => Qaiku
[lang] =>
[data] =>
[external_url] =>
[truncated] =>
[in_reply_to_status_id] =>
[in_reply_to_user_id] =>
[favorited] =>
[user] => stdClass Object
(
[id] => 1de0d571cb975840d5711deb6b2ddbda32958f358f3
[name] => Aleksi K
[screen_name] => aleksik
[location] => Uusikaupunki, Finland
[description] =>
[profile_image_url] => http://static.qaiku.com/blobs/1/D/1de...
[url] => http://www.qaiku.com/home/aleksik/
[protected] => 1
[followers_count] => 14
)

    )
This comes also from #Qaiku and #Fillari -channel: http://www.qaiku.com/api/statuses/cha...

trm commented on posted to #Qaiku-api 29.06.2009 (en)

tepheikk  

@trm I think that there's a bug in somewhere. I'll try to fix it as soon as possible.

tepheikk commented on posted to #Qaiku-api 30.06.2009 (en)

bergie  

@trm channel_timeline has been fixed now (thanks @tepheikk !)

bergie commented on posted to #Qaiku-api 01.07.2009 (en)

trm  

@tepheikk & @bergie: Thanks for fixing channel_timeline.

I got around the failed status_update problem by using apikey as authentication method instead of http user auth.

trm commented on posted to #Qaiku-api 01.07.2009 (en)

Login or register to leave a comment

Publicity
These messages are public and can be seen by anyone.