As you know, Google just released their social graph API
(http://code.google.com/apis/socialgraph/). I wrote a quick and dirty
client in PHP that cosumes the JSON and returns it in a data
structure. There's more work to be done, particularly in making the
fetch code work with either fopen or curl.
$sga = new SocialGraphApi(Array('edgesout'=>0,'edgesin'=>0,'followme'=>'1',
'sgn'=>0));
$mydata = $sga->get('http://redmonk.net');
echo "<pre>" . print_r($mydata,true) . "</pre>";
Find the code at:
http://diso.googlecode.com/svn/php/sgapi/
--
Steve Ivy
http://redmonk.net // http://diso-project.org
This email is: [ ] bloggable [x] ask first [ ] private
re: curl vs. fopen: the following has worked well for me so far.
<http://labs.tekartist.org/parseme/svn/trunk/index.php>
lines 409 -> 438: if(function_exists('curl_init')) ...
I would have submitted a patch with a variant of the above, but
starting to *get the character*, you're probably way ahead of me in
your uncommitted checkout. ;)
---
Stephane Daury - http://tekartist.org/
--
- Stephen Paul Weber, Amateur Writer
<http://www.awriterz.org>
MSN/GTalk/Jabber: singp...@gmail.com
ICQ/AIM: 103332966
BLOG: http://singpolyma.net/
I've had to write a to_json function in the past, I could prob' crank
a from_json function if needed.
Stephane
For what it's worth I just uploaded a Perl version of the API to CPAN.
It's almost exactly the same as the PHP one because, well, why not.
--
Chris Messina
Citizen-Participant &
Open Source Advocate-at-Large
Work: http://citizenagency.com
Blog: http://factoryjoe.com/blog
Cell: 412.225.1051
IM: factoryjoe
This email is: [ ] bloggable [X] ask first [ ] private
Can't wait for 2008-08-08... :p
Stephane