I have just started to develop an application for Facebook. I searched a lot in the internet but I could not find any comprehensive answer to my questions. I really hope that someone can help me. I have below questions:
Background:
I am developing a web application and I have registered my web application in Facebook and I have got my AppID and Secret. My requirement is to
Extract friend's list of users registered to my web application (When user logs in, he/she should be able to see all his/her friends in my application as well
When user clicks on his/her Facebook friend from my application, I want to be able to extract friend's information as well (like movies, interests, likes and groups)
In nutshell, 1) Extract one's friends list 2) Extract friend's information.
My second question is that, How to initilize FacebookWebApplication object? In a post in StackOverflow, I saw an answer to use "DefaultFacebookWebApplication" but this class is not available in my dll.
To your first question:
You'll want to get familiar with the Graph API http://developers.facebook.com/docs/reference/api.
You will be making web requests to the Graph API and parsing a response composed of JSON. There are several open source SDKs available to help you out. I would reccomend this one:
http://msdn.microsoft.com/en-us/windows/ee388574.
Hope that helps!
I would look at the newer Facebook C# SDK on CodePlex, it is actively supported & available as NuGet modules : http://facebooksdk.codeplex.com/ - or just search for "Facebook" in NuGet. Here is simple example using the SDK: http://facebooksdk.codeplex.com/wikipage?title=Getting%20Started%20with%20an%20ASP.NET%20MVC%203%20Website
Related
After reading Graph API documentation, stackoverflow questions, etc, i'm still confused on the task i have.
In short what i want:
-i have a classified ads website and i want to publish the ad from it to a facebook group where i'm not an administrator.
I have a facebook page (which is represent my website) from the name of which i want to publish an ad in the group. The ad in the group must be published as the "sale" post.
I'm using Facebook javascript SDK for this.
So, i'm really stuck in how do i do it.
what i tried is publishing using my app, using user/page access_token, but always getting different problems.
Can someone tell me, if it is possible to make what i want? and if possible - the algorhytm, what should i do for that?
I have web portal. I need to somehow get all Facebook wall posts from just one specific user or group( that represents my web portal). I need to have wall posts available on my web portal for further processing.
I will be also needing an option for posting messages from web portal to FB user/group wall.
I haven`t worked with FB API until now, so any materials, tutorials that can lead me in right direction would be of great help.
Can this be done without creating Facebook application?
Thank you
No,
Facebook just like that does not share its user information.
you will have to create an app on facebook to authorize urself,and on your web portal you will have to sek users permission before getting any user info.
craete facebook app here https://developers.facebook.com/apps
You can choose between javascript sdk and graph api on how you want to get user data.
You can use publish_stream permisiion to get the post on user wall.
Can this be done without creating Facebook application?
NO
Tutorials and materials:
Graph API
Samples & How-Tos
Google, but I would be careful here. Try to search for updated tutorials (written or updated on 2011)
I used this http://neosmart.de/social-media/facebook-wall its fb.wall plugin into jQuery .js library. It easy and can be edited symply via CSS
I noticed that my feedback news feed shows certain posts that aren't returned by any of the API's. (I tried the GraphAPI and the legacy REST API and FQL).
I can see those status updates at http://facebook.com on my news feed and I can also see them in the Facebook mobile app on iPhone and the mobile app on Windows Mobile.
Some of my friends seem to have set a privacy setting. I think it is this one: "How people bring your info to apps they use" - decheck "My Status Updates", although I can't confirm that is the only reason their posts don't show up, it seems one possible explanation.
So, what API are these facebook mobile applications using which returns the same data as the web site ? Is it possible for me to build another facebook client using that API?
Have you acquired the read_stream extended permission? This is required to see all postings. Typically without it you don't see any posts, but I think you can see posts that are marked as being completely public.
Does someone know the API for updating user profile information on facebook?
I want for instance to change my location from my client application. Is that possible?
I am using Facebook C# SDK, but an example in any other language would be great.
I do not believe they support updating a user's profile information from the exposed Facebook API. The Graph API documentation currently states that only the following elements are editable (editable as in, you can create them):
Wall Posts (feed)
Object Comments
Likes
Notes
links
events
event status
albums
album photos
checkins
As you can see, the User object is not one of objects Facebook exposes for edit purposes. It does support the ability to publish location checkins, however. While this does not meet your goal of modifying the location attribute of a user's profile, it does provide some basic abilities.
POST https://graph.facebook.com/<profile_id>/checkins?
access_token=<access_token>
&coordinates={...}
&message=my+message
&place=<page_id>
&tags=<tag1>,<tag2>,...
See the checkin documentation for an example using curl. This example should be executable by any platform specific Facebook API (Java, C#, etc..).
You can't update informations from the API. All you can do is reading / searching / posting / deleting / analysing data.
You can find everything there.
Cheers
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.