OAuth libraries
Adam D. Ruppe
destructionator at gmail.com
Tue May 29 19:32:56 PDT 2012
On Wednesday, 30 May 2012 at 02:18:58 UTC, darkstalker wrote:
> Is there an OAuth library for D?
I have one... but last time I tried it for twitter, it didn't
work. (But it does work for LinkedIn and a few others. WTF.)
http://arsdnet.net/dcode/oauth.d
It needs some modules from my other page too:
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff
cgi.d, sha.d, and curl.d I believe. It also uses the mhash
C library.
But since it is buggy (I think!) perhaps best to do it yourself
anyway.
Usage is something like this:
auto info = curlOAuth(twitter(api_key, secret), path_url,
["token_secret" : secret]);
to do a get and
curlOAuth(twitter(api_key, secret), path_url, ["token_secret" :
secret], "POST", "status=test");
to do a post.
I'm pretty sure the requests will work, but I was having trouble
with the authorization step and haven't gotten around to fixing it
yet. I've had a very long to do list this last month.
More information about the Digitalmars-d
mailing list