Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricsam committed Mar 1, 2011
1 parent 9861805 commit 181252f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README
@@ -1,7 +1,7 @@
twitter.oauth.py and facebook.oauth.py perform various pull operations from Twitter and Facebook. Must replace hardcoded values of token and secret keys with your own. Usage information is generally available when running the script. twitter.oauth.py and facebook.oauth.py perform various pull operations from Twitter and Facebook. The OAuth token and secret, Facebook ID, should be in your version of mypass.py. Usage information is generally available when running the script. facebook.search.py is used for searching (a way of discovering new contents by keyword search).


twitter_pull.sql and facebook_pull.sql should create the postgresql databases needed to store the data of these aforementioned scripts. twitter_pull.sql and facebook_pull.sql should create the postgresql databases needed to store the data of these aforementioned scripts.


I made tools for Sina Weibo as well. We also have tools for Sina Weibo, the most popular Chinese microblogging system. The API is more easily accessible with cURL, so I wrote a wrapper script for cURL in BASH shell (sinagetter.sh), and a Python script that interfaces with the database (sinastorage.py).


These scripts are developed under Linux (Ubuntu 10.04). I used Python 2.6.5 and my Postgresql is 8.3. These scripts are developed under Linux (Ubuntu Lucid 10.04). I used Python 2.6.5 and my version of Postgresql is 8.3 (with Postgis 1.5).
16 changes: 16 additions & 0 deletions mypass.py
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-

import pg

def getConn():
return pg.DB('DB_NAME', '127.0.0.1', 5432, None, None, 'DB_USER', 'DB_PASS')

def getTwitterOauth():
return { "consumer_key": "YOUR_CONSUMER_KEY", "consumer_secret": "YOUR_CONSUMER_SECRET",\
"oauth_token": "YOUR_OAUTH_TOKEN", "oauth_token_secret": "YOUR_OAUTH_SECRET" }

def getFacebookOauth():
return { "app_id": "YOUR_APPID", "access_token": "YOUR_TOKEN" }

def getFacebookUserId():
return "YOUR_FBID"

0 comments on commit 181252f

Please sign in to comment.