开发者

Facebook User Authorization to use an application

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");

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜