Simply call the FB.login with the publish_action
/public_stream
permission wherever you want to ask for the publishing permission-
FB.Login("publish_action", AuthCallback);
To find out which permissions user have at any given time, you can read the /user/permissions
Graph API endpoint, by writing something like-
FB.API("/me/permissions", HttpMethod.GET, delegate (FBResult response) {
// inspect the response and adapt your UI as appropriate
// check response.Text and response.Error
});