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

  • SEARCH
  • Home
  • 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 7018683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:05:01+00:00 2026-05-27T23:05:01+00:00

I would like to write a console application that automatically posts information to my

  • 0

I would like to write a console application that automatically posts information to my wall once every morning.

I have signed up for facebook developer and have a AppID and App Secret

I have been trying to play with the C# facebook SDK and looked through several examples.

Seems like the examples get a user token – but have to use a browser that is in windows forms. This is an automated process – so I dont want to have a user present.

Ive also created some examples using the application token – but it does not seem to be able to write to the wall.

I wrote the Twitter equivalent very quickly. I must be missing something here ???

What is the proper way to proceed?

It seems that all I should need to is:
FaceBookClient(appID, appSecret)
and then just
FaceBookClient.Put(message)
???

clarification added:

Playing with the C# facebook sdk winform application
I had to change their FacebookLoginDialog.cs to use the folling URL:

https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=APPID&client_secret=APPSECRET&scope=user_about_me,publish_stream,offline_access

which returns an accesskey in WebBrowser.DocumentText

If I then call:

            var fb = new FacebookClient(_accessToken);
            dynamic parameters = new ExpandoObject();
            parameters.message = "Hello World!";
            dynamic result = fb.Post("me/feed", parameters);

I get the exception:

(OAuthException) An active access token must be used to query information about the current user.

If I change the code above to NOT use that access token – but use the appID and Appsecret:

           FacebookClient myFacebookClient = new FacebookClient("APPID", "APPSECRET");
            dynamic parameters = new ExpandoObject();
            parameters.message = "Hello World!";
            dynamic result = myFacebookClient.Post("me/feed", parameters);

Then I get the exception:

(OAuthException) An active access token must be used to query information about the current user.

I guess it is the same exception

  • 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-05-27T23:05:02+00:00Added an answer on May 27, 2026 at 11:05 pm

    Here is what I found.

    Download the facebook C# sdk source code and samples from http://facebooksdk.codeplex.com/

    Unzip the code and load into Visual Studio the Facebook C# SDK sample called CS-WinForms.

    At the top of Form1.cs – enter your application ID

    Run the application.

    Form1.cs pops up with a button “Login to Facebook”. Click the button.

    FacebookLoginDialog.cs pops up with a browser window in it displaying facebook asking for permissions.

    FacebookLoginDialog.cs creates a browser window that will go to your user on facebook and request permissions. By default those permissions are: user_about_me,publish_stream,offline_access.

    Offline_access means the AccessToken you get – never expires

    Click “OK” in Facebook to allow the application to access your facebook data.

    FacebookLoginDialog.cs should find that you logged in and get the access token that never expires.

    The access token is a string.

    Insert a break point so that you can copy this access token. Save this access token as you can use it from now on to access to Facebook.

    Facebook developers website has some tools that you can use to check the access token
    https://developers.facebook.com/tools/debug/access_token
    You can enter your access token and click “Debug” and it should list your applicationID, UserID, and for “expires” it should say “never”.

    Once you have this access token – then you can simply write code like:

                            var fb = new FacebookClient(AccessToken);
                            dynamic parameters = new ExpandoObject();
                            parameters.message = FacebookString;
                            dynamic result = fb.Post("me/feed", parameters);
                            var id = result.id;
    

    to post message to Facebook!

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

Sidebar

Related Questions

I'm using HighLine to write my console application and I would like to modify
I would like to write the following code in c#. a) small console application
I would like to know if it's possible to write a console application to
I would like to write a plug-in that will allow a custom written CRM
I would like to write some scripts in python that do some automated changes
I would like to write a program that will identify a machine( for licensing
I would like to write a utility that will provide me with a relatively
I would like to write a small piece of program that launches threads, consumes
I would like to write a small program in C# which goes through my
I would like to write some data to a file in Ruby. What is

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.