title: Facebook Share Button for Dynamic Url
body: <p>I have a dynamic page with rewrited url. I want to add a facebook share button in that. So users click on the share button can share the page. But the facebook share developer page is asking for a specific url. Not sure how to share dynamically generated url.</p>
  
  <p>Here some code i found to capture the url. But I dont know, how to include this in facebook code.</p>
  
  <pre><code>jQuery(document).ready(function() {
      var href = jQuery(location).attr('href');
      var url = jQuery(this).attr('title');
      jQuery('#current_title').html(href);
      jQuery('#current_url').html(url);
  });
  </code></pre>
  
  <p>HTML Part of the Facebook Share Button</p>
  
  <pre><code>&lt;div class="fb-share-button" data-href="http://developers.facebook.com/docs/plugins/" data-type="button"&gt;&lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <p>Kindly help</p>
  
  <p>Many Thanks</p>