title: How to Create a Share to Facebook button on a localhost application
body: <p>I have a local host application in which a user can enter a blog to website by logging in and anyone can read the contents of the blog. while creating the blog the application auto generates a url based on the name of the blog. The URL is a basically a string e.g. Name: "New Blog" URL: "New-Blog".</p>
  
  <p>Now when a person views the blog i want to give him the ability to share the blog on his Facebook account. So i used a Facebook code generator to ge teh code for the share button.</p>
  
  <pre><code>    &lt;div id="fb-root"&gt;&lt;/div&gt;
      &lt;script&gt;
          (function (d, s, id) {
           var js, fjs = d.getElementsByTagName(s)[0];
           if (d.getElementById(id)) return;
           js = d.createElement(s); js.id = id;
           js.src = 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&amp;version=v3.2';
           fjs.parentNode.insertBefore(js, fjs);
          }(document, 'script', 'facebook-jssdk'));
      &lt;/script&gt;
  
  
       &lt;div class="fb-share-button" data-href="http://localhost/Blog/{{BlogList.Url}}" data-layout="button" data-size="large" data-mobile-iframe="false"&gt;&lt;a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&amp;amp;src=sdkpreparse" class="fb-xfbml-parse-ignore"&gt;&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p>This was the code that was generated. Now i realize that this is not going to work with the url i am passing: <code>http://localhost/Blog/{{BlogList.Url}}</code></p>
  
  <p>Now what url should i use to be able to share this on facebook while also get the url name that was auto generated.</p>