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 4272640
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:36:18+00:00 2026-05-21T07:36:18+00:00

I have a website that I have registered as a facebook app – I

  • 0

I have a website that I have registered as a facebook app – I now have an app ID.

My website is ASP.net C#. When the user clicks a button I’d like it to post a pre-defined message to their wall. I’m expecting Facebook to present a login dialog to the user – they login and grant publish permission to for my website app.

Does anyone have any sample code that would do this? I think I need to use the graph API but all the examples I’ve seen use PHP – which I know nothing about. I’m looking for an example that would use Java Script (of which I know almost nothing) or C# (beautiful!).

* Update *

I have managed to get the access_token. Now I make a call through the Facebook C# API to post to the wall. I get the error message:

(#803) Some of the aliases you requested do not exist: profile_id

I’ve stepped through the api code and found that it is trying to post to the following address: {https://graph.facebook.com/PROFILE_ID/feed}, the post data is: message=Sample+message+from+c%23+sdk&access_token=199209316768200|2.1avFTZuDGR4HJ7jPFeaO3Q__.3600.1302897600.1-100000242760733|R4DkNDf4JCb6B2F64n5TSQwBqvM

I’m pretty sure my token should be valid. Prior to requesting access token I requested publish_stream on the app authorization request as follows:

Response.Redirect ("https://www.facebook.com/dialog/oauth?client_id=" + myAppId + "&redirect_uri=" + myURL + "&scope=publish_stream");

The sdk code that actually makes the request is as follows:

private string MakeRequest(Uri url, HttpVerb httpVerb,
                                   Dictionary<string, string> args)
        { 
        if (args != null && args.Keys.Count > 0 && httpVerb == HttpVerb.GET)
        {
            url = new Uri(url.ToString() + EncodeDictionary(args, true));
        }

        HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;

        request.Method = httpVerb.ToString();

        if (httpVerb == HttpVerb.POST)
        {
            string postData = EncodeDictionary(args, false);

            ASCIIEncoding encoding = new ASCIIEncoding();
            byte[] postDataBytes = encoding.GetBytes(postData);

            request.ContentType = "application/x-www-form-urlencoded";
            request.ContentLength = postDataBytes.Length;

            Stream requestStream = request.GetRequestStream();
            requestStream.Write(postDataBytes, 0, postDataBytes.Length);
            requestStream.Close();
        }

        try
        {
            using (HttpWebResponse response 
                    = request.GetResponse() as HttpWebResponse)
            {
                StreamReader reader 
                    = new StreamReader(response.GetResponseStream());

                return reader.ReadToEnd();
            }
        }

Can anyone see what I’m doing wrong?

Many thanks,

Rob.

  • 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-21T07:36:19+00:00Added an answer on May 21, 2026 at 7:36 am

    First of all, you need to take care of Authentication. You need to create an Application, and use OAuth to get hold of the access token. It’s all described in the Authentication guide.

    To post something to the user’s wall, take a look at the Graph API under Publishing.

    As a start, you could use Facebook’s C# SDK

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

Sidebar

Related Questions

I have routes that are being registered from the database into an asp.net website
I have a website that's sort of a Craiglist type app. In my Database,
I have a website that's using forms authentication and membership. A user must have
I have a table that lists users that are registered at my website. The
A problem I have is that for years now people have signed/registered up to
Coding Platform: ASP.NET 4.0 WebForms with C# We have a website with the existing
I saw some website that after you have registered, you can use the service
Does Facebook have an API method that displays the total number of users registered
Is it possible that if I have registered my app to Appstore. But I
I have a problem in asp.net I'm developing a website in visual studio 2008

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.