can i use the facebook data for my data mining project - facebook

First i will tell what i want to achieve in my data mining project and then i will ask questions.
I am thinking of using the facebook to find particular user from particular location and from particular community. Then based upon their daily wall posting and likes , dislikes i want to generate a report on what user of particular community are doing or interested in.
Is that legal , i mean can i use my crawler to grab those users public data.

Read the Facebook Terms of Service.
That is what they are for, they tell you what you are allowed to do on their site and what not.
Most likely you are not allowed to access the web site with spiders, and the Facebook API will restrict your data gathering capabilities with rate control etc. except for users that are running your application (or you pay for the data...)

Related

Integrating Facebook into Google analytics

I want to add the 'Log in with Facebook' option to my website, however I'm unsure how to integrate the information gained when someone logs into my website with Facebook with my current Google Analytics.
Is it possible to link up a visit in Google Analytics with a user who has logged into the site with Facebook to enable me to see things like age, gender etc?
Any help you can give me on this would be much appreciated.
Thanks,
Ben
you may have to do this via a redirection or possibly a frame.
Google Analytics does nolt track individual users, it provides anonymized data. So at the top level, no you cannot do this. However, there are a few more things avaiable to you. One: Facebook provides facebook insights, their own tracking suite, that will give you demographic information on the users of a facebook app or fan page. You site will effectively become a facebook app when you use their user authenication, so you will be able to get insights tracking on you site. At the present moment, facebook insights and google analyitcs do not itegrate or share data. Facebook insight also provides anonymized data, so you will not be able to identify an individual through the tracking.
The final option is, now that you are tracking users through login, you can implement your own tracking info on your site to see what individual users are doing, and attempt to track their preferences.
Its also entirely legal (in the United States at least) to buy access to marketing data and use use your registered user name pool to get additional information.
If you wanted, you could set up a "funnel" in Google.
When a user logs in through Facebook, you could send them to a specific page and then track their progress from there...
http://www.google.com/support/analytics/bin/answer.py?answer=55515
So using this you could get the percentage of users who log in through Facebook... etc.
But to collect information other than that, you would have to get the correct permissions documented here eg. user_birthday (to get the user's Birthday) and query the Graph API from there, thus implementing your own tracking of users.
You can query the Graph API using the various SDKs that Facebook provide explained here.
First of all you should check out this Google document. It explains, how you set a custom unique user id via google analytics.
Further you've to send an event to google analytics (e.g. 'fb_login') via the callback function of your facebook login function.

Facebook application data storage

I created a Facebook app(game) in JavaScript. I used Facebook's php-sdk. I dint make a good use of the sdk except to display the name of the user logged, and his details.
I want to store the score of each user at some place. Checked FQL. As far as I saw, it doesnt allow you to store data, there was only SELECT query available. So is there any way in which we can append the score to user information or something similar.
In short can we store the data on Facebook
OR
We should use our own database server only to store the data.
In general you need to store your own data. While it might be possible to fake it by using some attribute of a user, it's certainly not the way it's designed to work and you can't count on the data always being available. You are better off setting up your own database and use the users' FB IDs to tie the info together.
Facebook now supports posting scores via scores api found here.
You can also publish achievements relevant to the game as in here
These have enough guidance to help you out !

Best practices for Facebook integration using the graph API

When it comes to integrating your site with facebook, is it recommended to save all the user's info from Facebook to your DB, or is it recommended to query in real time all the info you need based on the user's id?
For example the avatar sizes are different on my site than on my facebook, so I may have no choice but to download the fb avatar, but for other things like name, gender, hometown, I was wondering if I need to save that data.
Also, if I decide to change extended permissions at a later time, is that going to be an easy task?
The choice of whether to cache or re-query is totally dependent on your requirements. If you absolutely need the name to be exact then you should re-query every time. I worked on an facebook application that just didn't care about most user details so we didn't even store them let alone cache them.
Extending permissions is pretty easy.

Can you store facebook users' data and for how long?

Hi
I am developing a facebook app that involves the use of the user's email and ID. Storing users’ info to database is a more efficient approach for the purpose of the app. I am wondering if I am allowed to do this. I have read that facebook does not allow the storage of any kind of user's data for more than 7 days, however officially facebook website does not seem to mention this. Do you have any information about this issue?
The official policies are here. One relevant paragraph is:
"You may cache data you receive
through use of the Facebook API in
order to improve your application’s
user experience, but you should try to
keep the data up to date. This
permission does not give you any
rights to such data."

How to crawl Facebook based on friendship information?

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 crawler for Facebook based on friendship information?
I looked around but couldn't find any things useful so far. It seems Facebook isn't fond of such activity. Can I rely on the Facebook API?
Update (Jan-08-2010): Thank you very much for the responses. I guess I probably need to contact Facebook directly then. Cheers
Update (Feb-16-2011): A new book, "Mining the social web", just came out. In it, there is a chapter devoted entirely for mining Facebook using Python. Cheers.
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.
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.
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#
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/
You can use http://www.facebook.com/directory/ to get the public listed people.