Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8412999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:49:19+00:00 2026-06-10T00:49:19+00:00

I know this has been asked many times and I apologize if the answer

  • 0

I know this has been asked many times and I apologize if the answer is readily available but I have not been able to find the answer.

I’m using VS 2010 with the newest version of Facebook C# SDK. I installed it using the “Install-Package Facebook” command from my package manager in VS.

After spending quite a bit of time researching how to use the SDK, I am authenticating with FB through the Facebook Javascript SDK. Actually I followed the steps from the Getting Started Tutorial. And was quite successful in my endeavors. I now have a “Login” button on my aspx page, which brings up the login window and allows me to authenticate via that. I was also able to store my access token in a session variable and have it for use.

I have tested this by doing a Get on my FacebookClient object that I created with my access token and was able to retrieve data about the Fan Page.

So having said all this, in order to let you know that I have had some success. I was ready to start posting to the Fan Page via my web site and found this link Simplest way to post to a facebook fan page’s wall with C#!

I thought – great! This is exactly what I need. After copying the code from this post, I am now getting an “Unknown Type” on the ExpandoObject.

For the sake of convenience, here is the code that I copied.

if (Session["AccessToken"] != null)
{
    var accessToken = Session["AccessToken"].ToString();

    dynamic messagePost = new ExpandoObject();
    messagePost.access_token = "[YOUR_ACCESS_TOKEN]";
    messagePost.picture = "[A_PICTURE]";
    messagePost.link = "[SOME_LINK]";
    messagePost.name = "[SOME_NAME]";
    messagePost.caption = "{*actor*} " + "[YOUR_MESSAGE]"; //<---{*actor*} is the user (i.e.: Aaron)
    messagePost.description = "[SOME_DESCRIPTION]";

    FacebookClient app = new FacebookClient(accessToken);

    app.Post("/" + [PAGE ID] + "/feed", messagePost);
}

So my questions are really about the ExpandoObject. Is this object still in the SDK? If so, what am I missing and if not, how should I be making this call?

And while I’m asking, is there something else I need to do when requesting the access token in order to get the proper permissions to post on the Fan Page? As stated above, I followed the Getting Started page on Facebook C# SDK Site to get my access token. The reason I ask is because throughout my research I have been coming across different posts talking about making sure you have the proper permissions in order to do different things in Facebook.

Any help is greatly appreciated,
Dan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:49:20+00:00Added an answer on June 10, 2026 at 12:49 am

    I guess I just needed to do a little more poking around in StackOverflow to find my answer. I will go ahead and post it here for anyone else that might be having the same issue.

    As it turns out with the latest version of Facebook C# SDK, the way to post anything is by using the FacebookClient object and then calling the Post method on that object. Pretty easy actually. Here is the code that I used.

    if (Session["AccessToken"] != null)
    {
        var accessToken = Session["AccessToken"].ToString();
        FacebookClient app = new FacebookClient(accessToken);
    
        dynamic result = app.Post("/[ID]/feed", new Dictionary<string, object> { { "message", "This Post was made from my website" } });
    }
    

    Session["AccessToken"] is my authentication token that was obtained from the user logging into Facebook on the web page, and [ID] is the Id of my Fan Page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question has been asked many times, but I have not been
I know this has been asked many times, but I cant find answer to
I know this has been asked many times, but I can't find an answer
I know this has been asked many times, but not quite the way I'm
I know this question has been asked many times on here but I have
I know this question has been asked many and many times, but I have
I know this has been asked many times, but I can not understand this
I know this has been asked many times but i'm yet to find a
I know this has been asked many times before, but i still can't seem
I know this has been asked different ways several times, but I'm just not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.