2014-02-12 78 views
0

我知道這個問題被問了很多,但我似乎無法做到這一點。我正在試圖發佈到我的Facebook羣組。我不斷收到(#200)用戶未授權應用程序執行此操作錯誤。我正在使用.NET 4.5和Facebook SDK 6.4.2。謝謝。Facebook發佈到組oAuth訪問令牌問題

dynamic messagePost = new ExpandoObject(); 
      messagePost.picture = "http://www.yaplex.com/logos/yaplex-logo-with-text-small.png"; 
      messagePost.link = "http://yaplex.com/"; 
      messagePost.name = "[name] Facebook name..."; 
      messagePost.caption = " Facebook caption"; 
      messagePost.description = "[description] Facebook description..."; 
      messagePost.message = "[message] Facebook message..."; 

      const string acccessToken = "xxxx"; 
      var appp = new FacebookClient(acccessToken); 
      try 
      { 
       appp.Post("xxxxx" + "/feed", messagePost); 
      } 
      catch (FacebookOAuthException ex) 
      { 
       //handle oauth exception 
      } 
      catch (FacebookApiException ex) 
      { 
       //handle facebook exception 
      } 
+0

哪裏是你的登錄代碼?你是否向用戶請求正確的許可? – Igy

回答