title: Sharing posts on facebook by blog id
body: <p>I'm trying to share my individual blog posts from my websites blog onto facebook. Each post has a unique id as provided below, but the popup box is not changing the text content even tho the code is in unique divs with different id's, its just getting the first blog posts content.</p>
  
  <p>This is what my blogs different id's use.</p>
  
  <pre><code>&lt;? echo $blogitem_data['blogitem_id'] ?&gt;
  </code></pre>
  
  <p>And the code I'm using</p>
  
  <pre><code>&lt;script src='http://connect.facebook.net/en_US/all.js'&gt;&lt;/script&gt;
      &lt;p&gt;&lt;a href="#" style="cursor:pointer;" title="Share &lt;? echo $blogitem_data['blogitem_title'] ?&gt; on facebook"onclick='postToFeed(); return false;' onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','images/fb1a.png',1)"&gt;&lt;img src="images/fb1.png" name="Image9" width="59" height="23" border="0"&gt;&lt;/a&gt;&lt;/p&gt;
      &lt;p id='msg'&gt;&lt;/p&gt;
  
      &lt;script&gt; 
        FB.init({appId: "xxxxxxxxxxxxx59", status: true, cookie: false});
  
        function postToFeed(response) {
  
          // calling the API ...
          var obj = {
            method: 'feed',
            redirect_uri:'',
            link:'',
            picture: '',
            name: '- &lt;? echo $blogitem_data['blogitem_title'] ?&gt; ',
            caption: 'Welcome',
            description: '&lt;? echo $string  ?&gt; .'
          };
  
          function callback(response) {
  
          document.getElementById('divider-&lt;? echo $blogitem_data['blogitem_id'] ?&gt;').innerHTML = "Post ID: " + response['post_id'];
          }
  
          FB.ui(obj, callback);
        }
  
      &lt;/script&gt;
  </code></pre>