API not functioning properly

1 view
Skip to first unread message

Thor Erik

unread,
Oct 6, 2008, 4:34:47 PM10/6/08
to Cli.gs Interested
Ok after you opened the API up I got started making the final
adjustments to my script.
It works fine, except for one thing... the cligs generated aren't
added to my account :/ I have generated a proper API key and
everything.
this is how i did it:
curl_setopt($ch, CURLOPT_URL, 'http://cli.gs/api/v1/cligs/create?url='.
$url.'&title='.$title.'&key='.$api.'&appid=post%20to%20twitter%20by
%20thor%20erik');
where $api is set by a simple get command and the api key is added in
the js as it should.(&apikey=myapikey)

Pierre Far

unread,
Oct 6, 2008, 4:50:00 PM10/6/08
to Cli.gs Interested
Hi Thor

That's weird. Cligs keeps a log of API usage and if you tell me which
clig IDs were returned, I can check exactly what went wrong in your
trials.

Also, if you use Firefox, try using the Live HTTP Headers extension to
see what exactly is being sent to Cligs and what headers it returns.

Thanks,
Pierre

Thor Erik

unread,
Oct 6, 2008, 5:12:41 PM10/6/08
to Cli.gs Interested
this is the exact call with js:
javascript:(function(){window.open('http://example.com/cligs.php?
url='+encodeURIComponent(location.href)
+'&title='+encodeURIComponent(document.title)
+'&apikey=6c464af1c018e0f65f32a1189fad5a09');})();

the script just passes the vars to the url call i mentioned above.

Pierre Far

unread,
Oct 6, 2008, 5:23:12 PM10/6/08
to Cli.gs Interested
There is a new clig (G2zW3B) created with your key. It's the only one
assigned to your account.

There are a few others from the same IP address that are Public cligs.

So two things:

1. Can you please confirm that G2zW3B is visible in your account?
2. Clearly your trials are working some times, so have you tried
something new or is the API being unreliable?

Thanks,
Pierre

Thor Erik

unread,
Oct 6, 2008, 5:39:51 PM10/6/08
to Cli.gs Interested
I assume G2zW3B one is the one time i did the call manually instead of
JS calls, but in the end the call is the same, except for the url and
title, but as you can tell from the JS it encodes the html enteties

Pierre Far

unread,
Oct 7, 2008, 1:23:20 PM10/7/08
to Cli.gs Interested
Can you post the whole script please? Maybe a fresh pair of eyes can
spot the problem.

Cheers,
P
Reply all
Reply to author
Forward
0 new messages