【发布时间】:2011-08-16 09:16:06
【问题描述】:
我想首先生成一个模型来保存这些信息:
rails g model UserData UID:string birthday:string likes:string location:string \n
activities:string books:string movies:string music:string tv:string \n
interests:string post_count:string friend_count:string
然后我耙 DB。
然后我创建文件 $RAILS_ROOT/jobs/update_facebook.rb:
config = YAML::load(File.open("#{RAILS_ROOT}/config/facebook.yml"));
APP_ID = CONFIG['app_id']
fetching_app = FbGraph::Application.new(config['APP_ID']);
access_token = fetching_app.get_access_token(config['production']['client_secret']);
#Don't know what else to put in here
【问题讨论】:
标签: ruby-on-rails database ruby-on-rails-3 facebook-graph-api