Skip to content

Instantly share code, notes, and snippets.

@kenmickles
Created October 7, 2013 21:52
Show Gist options
  • Save kenmickles/6875568 to your computer and use it in GitHub Desktop.
Save kenmickles/6875568 to your computer and use it in GitHub Desktop.
Output a Ruby array of Facebook friend IDs
require 'httparty'
facebook_id=[FACEBOOK_ID]
access_token=[ACCESS_TOKEN] # See https://developers.facebook.com/tools/access_token/
puts HTTParty.get("https://graph.facebook.com/#{facebook_id}/friends?access_token=#{access_token}&limit=1000")['data'].map { |f| f['id'] }.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment