0

我使用我的 Facebook 个人资料创建了一个应用程序。我已经为我的 asp.net MVC Web 项目实现了功能,以便在 Facebook 上发布。但它只能将数据发布到我的个人资料。当其他授权用户在他们的墙上发布数据时,它会返回错误“远程服务器返回错误:(403) Forbidden”。我使用 Graph API 在 Facebook 上发帖。

谁能给我一个解决方案?创建的应用程序中是否有任何设置?

我的重定向操作是

public ActionResult Success()
        {
 PostToFacebookWall auth = new PostToFacebookWall();
            string Code = Request.QueryString["code"];

            if (Code != null)
            {
                ImpactWorks.FBGraph.Connector.Facebook facebook = auth.FacebookAuth();
                facebook.GetAccessToken(Code.ToString());
                FBUser currentUser = facebook.GetLoggedInUserInfo();
                IFeedPost FBpost = new FeedPost();
                Session["postStatus"] = "gdgdgdgd";

                if (Session["postStatus"].ToString() != "")
                {
                    //FBpost.Message = Session["postStatus"].ToString();

                    FBpost.Action = new FBAction { Name = "test link", Link = "http://blog.impact-works.com/" };
                    FBpost.Caption = "Test Image Share";
                    FBpost.Description = "Test Image Desc";
                    FBpost.ImageUrl = "http://retailpos.blob.core.windows.net/localitem1/UHSK2KJEKE6VCSP783P59VB6SZ1c822580-d0ff-46fc-af85-681aacef232f.png";
                    FBpost.Message = "Check out test post";
                    FBpost.Name = "Test Post";
                    FBpost.Url = "http://blog.impact-works.com";

                    facebook.PostToWall(currentUser.id.GetValueOrDefault(), FBpost);
                }
            }
            return Content("Posted succeessfully");
        }
4

0 回答 0