devku said:

devku

Make sure to mention projects you are working on over in http://jaiku.com/c/devku so that we can get them on to devku.org

2 years, 9 months ago.

9 comments so far

  • bergie

    Midgard's status message component is able to import/aggregate user's status from Jaiku. This uses the JSON API via PHP.

    See an example in my blog

    2 years, 9 months ago by bergie

  • pjakubo86

    I am working on a Vista sidebar gadget right now. No website, but I was hoping you could help me understand your JSON interface.

    Right now I am trying to make a POST call to api.jaiku.com/json to post a jaiku, but I always get this error:

    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/html.real/includes/controllers/api.php on line 60 null

    Here is the pertinent code:

    var params = "user=" + username + "&personalkey=" + apikey + "&method=test&echo=Hello"; req = new XMLHttpRequest(); req.onreadystatechange = readyStateChange; req.open("POST", "http://api.jaiku.com/json", true); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); req.setRequestHeader("Content-length", params.length); req.setRequestHeader("Connection", "close"); req.send(params);

    Any idea what is going wrong?

    2 years, 9 months ago by pjakubo86

  • raiglstorfer

    I can confirm this error ... this is occuring for me as well. XMLRPC and JSON interfaces are all returning "Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/html.real/includes/controllers/api.php on line 60 null"

    2 years, 9 months ago by raiglstorfer

  • malach

    Hi Guys.

    At this stage, all I can offer is a "sorry!" and a promise to do what I can to make sure our API-developer-folk are made aware of this ASAP. It's early AM Saturday right now, so they shouldn't be too far away...

    2 years, 9 months ago by malach

  • pjakubo86

    Yeah, I found out the problem is that "test" is not a real method. Use the presence.send method, like this and everything should work:

    var message = document.getElementById("sendMsg").value; var params = "user=" + username + "&personalkey=" + apikey + "&method=presence.send&message=" + message; req2 = new XMLHttpRequest(); req2.onreadystatechange = readyStateChange2; req2.open("POST", "http://api.jaiku.com/json", true); req2.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); req2.setRequestHeader("Content-length", params.length); req2.setRequestHeader("Connection", "close"); req2.send(params);

    2 years, 9 months ago by pjakubo86

  • malach

    Oh! Phew. In that case, i retract my "Sorry!" :)

    2 years, 9 months ago by malach

  • termie

    aye, test is not a method yet :p it will be though

    2 years, 9 months ago by termie

  • moksahero

    I'm working on simpler mobile browser version using API. Will also make Japanese version of it.

    2 years, 8 months ago by moksahero

  • larryborsato

    I'm still seeing the Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /var/www/jaiku/releases/20070531095453/includes/controllers/api.php on line 60 null error when I post an update.

    Any suggestions?

    2 years, 8 months ago by larryborsato

Sign in to add a comment