Skip to content

Instantly share code, notes, and snippets.

@yoshiori
Created November 4, 2010 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoshiori/662238 to your computer and use it in GitHub Desktop.
Save yoshiori/662238 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from tw3 import MyTwitter
from hatenagraph import HatenaGraph
from pit import Pit
if __name__ == '__main__':
twitter = MyTwitter()
result = twitter.show('yoshiori')
followers = result['followers_count'] #followers
following = result['friends_count'] #following
hatena_conf = Pit.get('hatena.ne.jp',{'require' : {'userid':'Your hatena.ne.jp userid','password':'Your hatena.ne.jp password'}})
graph = HatenaGraph(hatena_conf['userid'],hatena_conf['password'])
graph.post_data('twitter_following',following)
graph.post_data('twitter_followers',followers)
print 'following %s, followers %s' % (following,followers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment