Created
October 7, 2013 21:52
-
-
Save kenmickles/6875568 to your computer and use it in GitHub Desktop.
Output a Ruby array of Facebook friend IDs
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
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