trante trante - 4 months ago 15
PHP Question

Posting content links to social bookmarking servies

My blog entries are shared automatically in Twitter and Facebook.
I also need to bookmark the links to my new content.
Manually I add this links to Reddit and Digg.
Can I post an RSS feed to social bookmarking sites?
Or is it possible to create bookmarks on the sites like Digg or Reddit by using PHP etc.

I saw that Digg has an API for applications. But it seemed to heavy for just bookmarking links.
What would you recommend?
Thank you.

Answer

Reddit has an API that is described on their Github wiki. It would be pretty straight forward to code this in PHP using their JSON based API. For instance, you could encode the required data for posting a story on Reddit in JSON with PHP by posting the resulting JSON from below to the appropriate URL.

<?php 
$params = array('uh' => 'user modhash', 
                'kind' => '', 
                'sr' => 'subreddit', 
                'title' => '', 
                 'r' => 'subreddit'); 
echo json_encode($params); 
?>

As for Digg, they provide a pear package for their API with documentation located here. Quick edit: I really think that Digg's API is the easiest option for posting the links; I don't envision their being many other ways to do this as easily.