I have a .net website and I want to post messages by the facebook api to every user's wall.I want via an application to post messages, but the error message when i execute Stream.Publish is "T开发者_开发百科he user hasn't authorized the application to perform this action". I am using the Facebook Developer Toolkit. I believe that i make something wrong in the configuration of the settings of my facebook application but I am not sure.
Have you tried the samples It may help you understand if you do something wrong with your code.
Add the following this in the Page_PreInit() event
base.RequiredPermissions = new List();
base.RequiredPermissions.Add(Facebook.Schema.Enums.ExtendedPermissions.publish_stream);
base.RequireLogin = true;
or use
Response.Redirect("http://www.facebook.com/login.php?api_key=" + ApiKey + "&next=http://apps.facebook.com/yourapplication/&display=page&locale=en_US&return_session=0&fbconnect=0&canvas=1&legacy_return=1&req_perms=publish_stream");
精彩评论