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"
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...
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.
9 comments so far
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
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
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
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
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
Oh! Phew. In that case, i retract my "Sorry!" :)
2 years, 9 months ago by malach
aye, test is not a method yet :p it will be though
2 years, 9 months ago by termie
I'm working on simpler mobile browser version using API. Will also make Japanese version of it.
2 years, 8 months ago by moksahero
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