var client = new FacebookClient(); dynamic token = client.Get("oauth/access_token", new { client_id = ConfigurationManager.AppSettings["FacebookAPI"].ToString(), client_secret = ConfigurationManager.AppSettings["FacebookAPIKey"].ToString(), grant_type = "client_credentials" }); client.AccessToken = token.access_token; dynamic parameters = new ExpandoObject(); parameters.title = detail.Title; parameters.message = GetDescription(detail.Description, detail.Content); parameters.link = "http://test.com/blog" + detail.RelativeLink;//HttpContext.Current.Request.IsLocal ? "http://test.com/blog" + detail.RelativeLink : HttpContext.Current.Request.Url.Authority + "" + detail.RelativeLink; var result = client.Post(ConfigurationManager.AppSettings["FacebookPageID"].ToString() + "/feed", parameters);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)