private void LocationActions(NameValueCollection QueryString, FacebookLayer fb) { Database db = new Database(); SocialerMapDBObject obj = new SocialerMapDBObject(); if (QueryString["action"] == "delete") { obj.LocationID = Request.QueryString["locationID"]; db.deleteSocialerObj(obj); } else if (QueryString["action"] == "add") { obj.Fid = fb.user.facebookID; obj.Date = Request.QueryString["Date"]; obj.Latitude = Request.QueryString["Latitude"]; obj.Longitude = Request.QueryString["Longitude"]; obj.postToWall = Convert.ToBoolean(Request.QueryString["postwall"]); obj.Desc = Request.QueryString["description"]; db.InsertSocialerObj(obj); if (obj.postToWall) { dynamic parameters = new ExpandoObject(); parameters.message = "Checked in via SocialerMap"; parameters.link = "www.socialermap.com/default.aspx?fid=" + fb.user.facebookID; parameters.name = QueryString["description"]; parameters.privacy = new { value = "ALL_FRIENDS", }; fb.fbClient.Post("/me/feed", parameters); } } }
private void LocationActions(NameValueCollection QueryString,FacebookLayer fb) { Database db = new Database(); SocialerMapDBObject obj = new SocialerMapDBObject(); if (QueryString["action"] == "delete") { obj.LocationID = Request.QueryString["locationID"]; db.deleteSocialerObj(obj); } else if (QueryString["action"] == "add") { obj.Fid = fb.user.facebookID; obj.Date = Request.QueryString["Date"]; obj.Latitude = Request.QueryString["Latitude"]; obj.Longitude = Request.QueryString["Longitude"]; obj.postToWall = Convert.ToBoolean(Request.QueryString["postwall"]); obj.Desc = Request.QueryString["description"]; db.InsertSocialerObj(obj); if (obj.postToWall) { dynamic parameters = new ExpandoObject(); parameters.message = "Checked in via SocialerMap"; parameters.link = "www.socialermap.com/default.aspx?fid=" + fb.user.facebookID; parameters.name = QueryString["description"]; parameters.privacy = new { value = "ALL_FRIENDS", }; fb.fbClient.Post("/me/feed", parameters); } } }