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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:18:33+00:00 2026-06-13T19:18:33+00:00

I am using Facebook c# SDK to post status & images on users wall.

  • 0

I am using Facebook c# SDK to post status & images on users wall.

I am able to post status but image is not getting posted

Here is my code:

[HttpPost]
    public ActionResult PostPhotoOnWall(HttpPostedFileBase file)
    {
        var client = new FacebookClient();

        // Post to user's wall
        var postparameters = new Dictionary<string, object>();

        postparameters["access_token"] = Session["access_token"].ToString();
        postparameters["picture"] = "http://localhost:8691/Content/themes/base/images/12WIPJ50240-2V91.jpg";

        var result = client.Post("/me/feed", postparameters);

        return View("PostPhoto");
    }

On user wall status is posted without image.

Can any one help me .

  • 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-13T19:18:34+00:00Added an answer on June 13, 2026 at 7:18 pm

    I Solved It, Bellow is the code

    [HttpPost]
        public ActionResult PostPhotoOnWall(HttpPostedFileBase file)
        {
            var filename = Path.GetFileName(file.FileName);
    
            var client = new FacebookClient();
    
            // Post to user's wall
            var postparameters = new Dictionary<string, object>();
            var media = new FacebookMediaObject
            {
                FileName = filename,
                ContentType = "image/jpeg"
            };
            var path = Path.Combine(Server.MapPath("~/Content/themes/base/images"),filename);
            file.SaveAs(path);
    
            byte[] img = System.IO.File.ReadAllBytes(path);
            media.SetValue(img);
    
          postparameters["source"] = media;
            postparameters["access_token"] = Session["access_token"].ToString();
         //   postparameters["picture"] = "http://localhost:8691/Content/themes/base/images/12WIPJ50240-2V91.jpg";
    
            var result = client.Post("/me/photos", postparameters);
    
            return View("PostPhoto");
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to post a status update using facebook php sdk. Code posted below. As
i'm trying to post an image to my users's facebook wall once they hit
I want to post a message on my friends wall using facebook sdk 3.0.
I'm using Facebook SDK and I want to post message on my wall. It's
I'm using facebook-android-sdk to post messages to my wall. The following request: Bundle params
I am using Facebook SDK to post some test wall post on my own
I'm using Android facebook SDK for post on facebook wall.I have used following code
I have been using the Facebook Javascript SDK to post content from a CMS
using Facebook Javascript SDK (since FBml doesn't work anymore), posting to a wall using
I'm using the Facebook SDK to allow users to share content through my app

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.