Facebook

image.png

Facebook Opens it’s doors to the Community…

People usually want themselves to be associated with big companies like Microsoft, Apple, Facebook etc.  Facebook has now opened it’s doors to the community in terms of opening volunteer positions like Beta Tester along with certain rewards. To apply for this program you just need to choose a question from a list and need to answer that in your own words. Facebook will test your analytical skills and knowledge on a particular domain based upon your answer submitted and will revert back to you incase you qualify as a beta tester.

facebook_logo.png

.NET API Get Facebook User Status, Comments, Picture and other details

Before you just jump into reading and implementing this post, please take a look on my posts earlier on how to get access_token and profile id (uid) for the current user on whose behalf you are making requests to Facebook.

http://geekdeck.com/vb-net-facebook-get-access-token-for-desktop-application/

http://geekdeck.com/net-get-facebook-user-profile-id-uid/

Once you have access to Access Token, Profile Id and you know to make HTTP requests and how to deal with XML responses, you can query Facebook to return you user status XML

Dim uristatus As String = “https://api.facebook.com/method/status.get?uids=” & _ProfileID & “&access_token=” & accesstoken & “&limit=3″        requesturl = GetPageAsString(uristatus)        ParseXML(requesturl)        TextBox1.Text = requesturl

You can have User’s last 3 statuses More >

facebook_logo.png

.NET Get Facebook User Profile Id (uid)

Before getting the User Profile Id from your .NET application you need to have Access Token, please read my earlier post on how to get an Access Token:

http://geekdeck.com/vb-net-facebook-get-access-token-for-desktop-application/

Usually the major communication between a 3rd party app and Facebook happens via access token specially in the case of desktop apps where you provision the app with extended permission of offline_access. But again having the logged in User Profile Id is also very necessary at times because its going to help you up in storing the access_token against the profile id (uid) incase your app is used by multiple users on the More >

facebook_logo.png

VB.NET Facebook get access token for desktop application

Following are the steps to Authenticate and Get Access Token for Facebook Users in your VB.NET, C# Facebook Application directly using the Facebook old Rest & Graph API rather then relaying on third party wrappers.

1) Embed a Web Browser control in your desktop application.

2) All the communication with Facebook is going to be through HTTP Request, Response method

3) Prepare your first Authentication request for token in the following manner: Private _strAuthUrl As String = https://graph.facebook.com/oauth/authorize?client_id=117832888261979&redirect_uri=http://www.facebook.com/connect/login_success.html&scope=offline_access,publish_stream,user_status&type=user_agent

In this request you are asking Facebook to issue you an access token for this particular user by specifying the Client_Id which is your Application Id More >

facebook_logo

How to access Facebook API from .NET?

 No doubt Facebook has turned out to be the largest ever social networking platform. This gives an opportunity to developers to storm ideas and turn them into Facebook Apps which indeed are really popular in users today. I also tried to play around with data calling in Facebook API or using Facebook SDK. So if you are working on Microsoft Platform then Facebook doesn’t offers you much as all the layered SDKs which you will see available and documented on Facebook site are supporting JAVA, PHP, Python, Android, IPhone., So there is no deal available for developers who are on More >