The following link is for sharing a page on Twitter:
Is there a similar option for Facebook that doesn't require JavaScript?
I know about http://facebook.com/sharer.php, but that requires a get parameter to be inserted manually (which I'm not going to do), or with JavaScript (which doesn't fit my situation).
You could use
<a href="https://www.facebook.com/sharer/sharer.php?u=#url" target="_blank">Share</a>
Currently there is no sharing option without passing current url as a parameter. You can use an indirect way to achieve this.
Example ASP .Net code:
public partial class Sharer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var referer = Request.UrlReferrer.ToString();
if(string.IsNullOrEmpty(referer))
{
// some error logic
return;
}
Response.Clear();
Response.Redirect("https://www.facebook.com/sharer/sharer.php?u=" + HttpUtility.UrlEncode(referer));
Response.End();
}
}