This Python source code for Twitter API is based on "Mining the Social Web (Second Edition) and provides sample code for accessing Twitter's API for development and oAuth access for production purposes, discovering trending topics, searching for tweets, constructing convenient function calls, saving and restoring JSON data with flat-text files, using MongoDB, sampling the Twitter firehose with the Streaming API, collecting time-series data, extracting tweet entities, finding the most popular tweet and tweets in a collection of tweets, tabulating frequency analysis, finding users who have retweeted a status, extracting a retweet attribution, making robust Twitter requests, resolving user profile information, extracting tweet entities from arbitrary text, getting friends and followers for a user, analyzing user's friends and followers, harvesting a user's tweet, crawling a friendship graph, analyzing tweet content, summarizing link targets, and analyzing a user's favorite tweet.
Social sharing site Digg is preparing a version upgrade to its API. Along with its flagship site's major redesign, which is not yet public, Digg will launch v2 of its developer platform. However, there are new digs for Digg developers available now, with documentation, language kits and what will likely become an app gallery.
If you are looking to display social networking statistics on your site, Shared Count just showed up with about the simplest tool you could ask for. Given a URL, the Shared Count API will contact the APIs of Facebook, Twitter, Google Buzz, Digg, Delicious, and StumbleUpon to retrieve their statistics.