Skip to content

Instantly share code, notes, and snippets.

@plcstevens
Created January 15, 2013 14:25
Show Gist options
  • Save plcstevens/4539012 to your computer and use it in GitHub Desktop.
Save plcstevens/4539012 to your computer and use it in GitHub Desktop.
require 'comufy'
connect = Comufy.connect(access_token: ENV["COMUFY_ACCESS_TOKEN"], expiry_token: Time.now.to_i + 1000000)
# or use a yaml file
# connect = Comufy.connect(yaml: "path/to/yaml/file")
# lets add a user to our facebook application!
# http://graph.facebook.com/THEIR_NAME will get you back their id
# tags are the data fields to enter for this user.
app_name = "NAME_OF_YOUR_APPLICATION"
user_id = "THEIR_FACEBOOK_ID"
tags = { 'dob' => '1978-10-01 19:50:48' }
# will return true when successful, otherwise it'll return false along with a logger.warn message!
puts connect.store_user(app_name, user_id, tags)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment