Take the 2-minute tour ×

Hi! Before I start, I apologize for my poor English, I'm not living in a country having English as an official language.

I'm a student studying data mining. And I'm facing a trouble.

For my analysis, I tried to crawl users' personal interests and their favorite movies music, etc. I don't need their real names or any sensitive data, but it seems like I need to achieve permission from each user to be able to obtain these information. I thought I could gain it easily since they are accessible through the Facebook surfing.

So What I want to ask are,

  1. Is it possible for me to acquire user's interest information without having their permission?

  2. Do I have to use FQL to crawl those data? Am I thinking the right way? I'm reading the manual given by Facebook. However, since I'm not that good English reader, I don't have 100% comprehension.

Thanks for reading this terrible English, and I wish to have some hints from you guys. Thanks! :)

share|improve this question
add comment

2 Answers

Facebook let you access data about users who authorized your application and data about their friends (and not friends of friends for example).

Once a user authorizes your application you can access his basic information (like id, name, gender) and other data he made public. For anything more you'll have to ask for the different permissions from the user, once granted by him you can access it.

You can also ask from an app user for permissions regarding his friends, if he grants you those then you can also query facebook about data of his friends.

Check out the permissions documentation to see what you can access and which permissions you need to ask for.

You can use FQL to extract data from facebook, but you can also use the Graph API (or more specifically: User object). For example, to get the interests of the logged in user you just issue an http request to:


You'll have to get the user_interest permission for that of course..

I recommend using the Graph Api Explorer for testing graph api calls (or event FQL ones) i.e.: User Interests Example.

share|improve this answer
Thanks for your answer!! :) What I wanted to know was that whether I need to receive permission from users or not. And your answer letting me know that I need to. Thanks for your answer. But, If there's anyone who knows other way to achieve the information without user's permission. Then I'll be pleased if the one share his idea. –  FoolyCooly Mar 7 '12 at 15:15
Are you aware of the talk about privacy? If you could just access information about users through the facebook graph api it would mean: no privacy. You can read here: "The Graph API as such allows you to easily access all public information about an object. To get additional information about a user, you must first get their permission." - So, you can wait for someone to come and tell you otherwise, but it won't happen. –  Nitzan Tomer Mar 7 '12 at 15:45
I know the concept of 'privacy'. But, I thought it can be possible since I can easily access those information through the Facebook brouwser.... And your answer telling me that it's not. Thanks for your help! –  FoolyCooly Mar 7 '12 at 23:01
What you see when you browse is different than what your application will be able to "see", if you want to check that, try the Graph Api Explorer that's what it is made for. –  Nitzan Tomer Mar 8 '12 at 0:02
add comment

Theoretically, you can, but it is hard. For example, you can use a browser (e.g. mechanize in python) to simulate the browsing activity, and save the webpage you are visiting. Then you need to use some scraping code to extract the information you want.

The following mechanize (python) code can help you get started.

import mechanize

br = mechanize.Browser();
br.addheaders = [('User-Agent', 'Firefox')]#Googlebot
br._factory.is_html = True

r = br.submit();

if r == None:
    print 'Error logging into facebook. '

# Save the document to file.
import os
uid = '<your_user_id>' # for example abc.xyz
dir = 'htmls/'

timeline = open(dir + 'timeline.html', 'w')
htmldoc = ''.join(br.open('https://www.facebook.com/' + uid).read());
# timeline.write(htmldoc.decode('utf-8', 'replace'))

HTH, Shumin

share|improve this answer
add comment

Your Answer


