Post On Facebook Page As Page Not As Admin User Using Facebook C# SDK

后端 未结 4 851
北海茫月
北海茫月 2021-01-01 04:10

I\'m developing C# application which manages fan page on Facebook which uses Facebook C# SDK. I\'ve encountered two problems one is connected with posting messages on wall a

4条回答
  •  清酒与你
    2021-01-01 04:35

    in MVC4 and C# SDK, this got my goal

      [FacebookAuthorize("publish_stream")]
        public ActionResult PostNotification(FacebookContext context)
        {
            var dicParams = new Dictionary();
            dicParams["message"] = "đang tập code cho facebook ~@@";
            dicParams["caption"] = "bbbbb";
            dicParams["description"] = "cccccc";
            dicParams["name"] = "http://www.facebook.com";
            dicParams["req_perms"] = "publish_stream";
            dicParams["scope"] = "publish_stream";
            string destinationID = context.UserId;
            context.Client.Post("/" + destinationID + "/feed", dicParams);
            return RedirectToAction("Index");
        }
    

提交回复
热议问题