Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. How to post on facebook page?

How to post on facebook page?

Scheduled Pinned Locked Moved Web Development
csharpasp-netcomtoolshelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Snowjim
    wrote on last edited by
    #1

    Hi, I have created a facebook page and a facebook application for my ASP.NET website and now I need to post messages from my ASP.NET webpage onto the facebook page with help of facebook SDK .NET. This is what I got so far :

    public static bool UploadPost(string message)
    {
    dynamic result;

        //https://developers.facebook.com/tools/explorer/
        //https://developers.facebook.com/tools/access\_token/
        FacebookClient client = new FacebookClient("secret access token");
    
    
        result = client.Get("oauth/access\_token", new
            {
                client\_id = "\[Client ID number\]",
                client\_secret = "\[Client sercret",
                grant\_type = "client\_credentials",
            });
    
        result = client.Post("\[facebook app Id\]/feed", new { message = "Test Message from app" });
        //result.id;
        result = client.Get("\[facebook app Id\]");
    
        return false;
    }
    

    When running this I get(on client.Post) :

    Additional information: (OAuthException - #200) (#200) The user hasn't authorized the application to perform this action

    If I remove the client.Post row every thing works good, the correct data is fetched. I have tried follow some helps on facebook SDK .NET website but it is still not working. Pleas help

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups