asp.net - (OAuthException) (#200) exception while posting to facebook wall using facebook c#sdk -


i working on asp.net mvc3 , using facebook c# sdk post on fb wall . following error while trying post on wall.

(oauthexception) (#200) user has not granted application permission automatically publish feed stories

please see code used .

string appaccesstoken = "accessstoken"; //this token got after creatting app in fb developer.

        facebookclient fb = new facebookclient(appaccesstoken);         dictionary<string, object> parameters = new dictionary<string, object>()                                                     {                                                         {"description", "testbeskrivning"},                                                         {"link", ""},                                                         {"name", "testtitel" }                                                      };          fb.post("myfbid/feed", parameters); 

that's because haven't added right permission when loginurl: have add following permission: publish_stream.

var oauthclient = new facebookoauthclient(facebookapplication.current); oauthclient.redirecturi = new uri(redirecturl);  dictionary<string, object> oparams = new dictionary<string, object>(); oparams.add("scope", "publish_stream");  var loginuri = oauthclient.getloginurl(oparams); 

for facebook features need permissions users. check following page current permissions:

https://developers.facebook.com/docs/reference/api/permissions/


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -