I was playing around with the facebook API and I found this underneath post that I wanted to repeat. It works almost perfectly, except for the fact the print returns an empty array. The friends variable does contain 440 friends. I read that people can block this API with their privacy settings, it seems unlikely all 440 did. Am I doing something wrong? The post is from 2012, updated in 2015, maybe its depricated? Python - Facebook API - Need a working example
Also cant get it working by watching the documentation http://facebook-sdk.readthedocs.io/en/latest/api.html#get-connections
import facebook
token = 'token'
graph = facebook.GraphAPI(token)
friends = graph.get_connections("me", "friends")
friend_list = [friend['name'] for friend in friends['data']]
print (friend_list)