+ Reply to Thread
Results 1 to 2 of 2

Thread: Facebook posting message to a friend`s wall

  1. #1

    Facebook posting message to a friend`s wall

    I'd like to know how can i post a message on somebody's wall in facebook using the Facebook C# SDK?
    Last edited by csharpmaster; 10-31-2012 at 04:11 AM.

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    35
    I'll assume that you have downloaded the C# sdk from developers.facebook.com

    So before starting you will need the following :
    - user id
    - Access Token

    Code :
    Code:
    private static void PostToWall(string message, long userId, string wallAccessToken)
    {
        var facebook = new FacebookClient(wallAccessToken);
    
        string url = string.Format("{0}/{1}", userId, "feed");
    
        var argList = new Dictionary<string, object>();
    
        argList["message"] = message;
    
        facebook.Post(url, argList);
    }
    Actually , the URL format will be like that :
    Code:
    https://graph.facebook.com/USER_ID/feed?message=MESSAGE&access_token=TOKEN

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts