how to post to facebook page wall from .NET

前端 未结 7 843
执念已碎
执念已碎 2020-12-09 23:30

I\'ve created Facebook page. I have no application secret and no access token.

I want to post to this page from my .NET desktop application. How can I do it? Can any

7条回答
  •  青春惊慌失措
    2020-12-10 00:01

    You need to ask the user for the publish_stream permission. In order to do this you need to add publish_stream to the scope in the oAuth request you send to Facebook. The easiest way to do all of this is to use the facebooksdk for .net which you can grab from codeplex. There are some examples there of how to do this with a desktop app.

    Once you ask for that permission and the user grants it you will receive an access token which you can use to post to your page's wall. If you need to store this permission you can store the access token although you might need to ask for offline_access permission in your scope in order to have an access token that doesn't expire.

提交回复
热议问题