How to crawl Facebook based on friendship information?

前端 未结 5 1548
时光说笑
时光说笑 2021-02-01 16:48

I\'m a graduate student whose research is complex network. I am working on a project that involves analyzing connections between Facebook users. Is it possible to write a crawle

相关标签:
5条回答
  • 2021-02-01 17:24

    The problem is that facebook friendship information is typically private and only accessible to friends. It should be a lot easier to build this network on Twitter, if this is an option for you.

    0 讨论(0)
  • 2021-02-01 17:25

    This lifecode post provide a basic python script to scrape your facebook friends contact info. The output of this script, is the profile ID, profile pame, profile URL, e-mail address and mobile/phone number (if provided by friend). WARNING: This is against Facebook TOS. Use at your own risk. Info provided for educational and research purposes http://ruel.me/blog/2010/11/26/scrape-your-facebook-friends-contact-info-with-python/

    0 讨论(0)
  • 2021-02-01 17:26

    You can use http://www.facebook.com/directory/ to get the public listed people.

    0 讨论(0)
  • 2021-02-01 17:28

    As others have stated, this is typically private information. If, however, Facebook per se isn't a requirement, you could use Google's Social API. A snippet from the Google Social Graph API page: "With the Social Graph API, developers can now utilize public connections their users have already created in other web services. It makes information about public connections between people easily available and useful."

    Here's an article on using it in Ruby: http://articles.sitepoint.com/article/google-social-graph-api-ruby-rails#

    0 讨论(0)
  • 2021-02-01 17:50

    You can't rely on the Facebook API unfortunately. To get friend information, you need to use something like friends.get(). However, any Facebook API method that returns user information like this requires that you have an active session key from that user, and generally the way you get an active session key is to have the user come to your Facebook application or page.

    In summary, the information you are talking about is essentially private. You can't pick a person from Facebook, get their friends, and get those friend's friends, and so on. To me this is a good thing for privacy, but of course it prevents arbitrary analysis.

    I'd throw out the idea of writing a quick and dirty application with some user appeal that you could use for research. If a group like S**t My Dad Says (funny, not really safe for work) can get 120,000 users in a couple of months, you could probably plead your case with a small research application and get a reasonable amount of users.

    0 讨论(0)
提交回复
热议问题