Created
November 4, 2010 08:43
-
-
Save yoshiori/662238 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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