Status Update example

Apr 4, 2011 at 7:19 PM


I was wondering if anyone could post a code example of how to use the FaceSharp SDK to simply post to a users wall. I have the code written to obtain the access token, but can not figure out how to do the simplest thing a developer would want to do with facebook app... post a new status. Every time I find example that i think are promising, they get so complex and confusing that I don't think I'm looking in the right spot. Using SDK's with OAuth for other social network site, this is soooooo  simple, and takes all of 15 lines of code total... there must be a simple code example out there for this... if someone could please help by posting an example in C# or VB.Net to post a new status (I already have the access Token, so I don't need code to obtain that... the point of the app is to use offline access, after the user "allows" the app, and I store the Access Token for then to use each time they use my app... all I need is the post new status example for this... pleeaaassseee), I would greatly appreciate it... THANK YOU!!

Apr 4, 2011 at 7:43 PM

No problem,

Here's a quick example:

            var accessToken = "12321lkj321lk3j21lk321j";
            var facebookApi = new FacebookApi(accessToken);
            string toUserId;
            string message = "Facesharp makes it easy!";

                (String.Format("{0}://{1}/{2}", Request.Url.Scheme, Request.Url.Authority, "areas/facebookapp/images/logo-facesharp.gif")),
                "The .NET Facebook Starter Kit",
                "Get started with Facebook Development Today!"


Apr 4, 2011 at 7:59 PM

Thank you!!

Apr 4, 2011 at 11:53 PM

Last question on this.... 

In the libraries of the download available for Facesharp, I don't see any .dll's named "facebook" or "FacebookApi" ... There one that start with Castle... or Hammock or.. Newtonsoft.Json... System. or... nunit.framework.dll.... which one actually contains the facebook methods?

Apr 5, 2011 at 12:25 AM

okay, so I got it to work by just importing the actual whole set of .cs files... I would think this would be include in a .dll, but that's fine, at least I got it.. Thanks!

Apr 5, 2011 at 2:10 AM

Last one... really....


What do I need be able to use," Request.Url.Scheme, Request.Url.Authority" and not have a red error line under "request"? 

Apr 5, 2011 at 7:55 PM

so the answer issssss........ import (or) using System.Net 

I'm done! thanks!

Apr 5, 2011 at 9:12 PM

I've created an example at :