title: How to send the og:Title og:Image og:Description og:url info from C# to Facebook
body: <p>I have a like button in my page. On clicking the Button, I am trying to send the following tags information in the facebook...</p>
  
  <pre><code>&lt;meta property="og:title" content="Title" /&gt;
  &lt;meta property="og:description" content="Description" /&gt;
  &lt;meta property="og:url" content="url info" /&gt;
  &lt;meta property="og:image" content="image url" /&gt;
  </code></pre>
  
  <p>Following is my Like Button Frame</p>
  
  <pre><code>&lt;iframe frameborder="0" scrolling="no" allowtransparency="true" 
    style="border: none; overflow: hidden; width: 260px; height: 35px;" 
    src="http://www.facebook.com/plugins/like.php?
    href=http://localhost:49334/WebForm1.aspx&amp;amp;send=false&amp;amp;
    layout=button_count&amp;amp;width=100&amp;amp;show_faces=false&amp;amp;
    action=like&amp;amp;colorscheme=light&amp;amp;font=arial&amp;amp;height=35"&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p><strong>Following is the first Approach to dynamically handle the Meta Tags.</strong></p>
  
  <pre><code>var fbTitleTag = new MetaTag
  {
      AgentPageURL = "/",
      MetaTagName = "og:title",
      UserSiteName = CurrentAgent.UserSiteName,
      MetaTagContent = Request.Cookies.Get("MasterTitle").Value
  };
  
  var fbDesc = new MetaTag
  {
      AgentPageURL = "/",
      MetaTagName = "og:description",
      UserSiteName = CurrentAgent.UserSiteName,
      MetaTagContent = Request.Cookies.Get("MasterDescription").Value
  };
  
  
  var fbUrl = new MetaTag
  {
      AgentPageURL = "/",
      MetaTagName = "og:url",
      UserSiteName = CurrentAgent.UserSiteName,
      MetaTagContent = Request.Cookies.Get("MasterURL").Value
  };
  
  
  
  var fbImage = new MetaTag
  {
      AgentPageURL = "/",
      MetaTagName = "og:image",
      UserSiteName = CurrentAgent.UserSiteName,
      MetaTagContent = Request.Cookies.Get("MasterImage").Value
  };
  
  var tags = new MetaTagCollection { fbTitleTag, fbDesc, fbUrl, fbImage };
  
  Literal ltMetaTags = null;
  ltMetaTags = (Literal)this.Master.FindControl("ltMetaTags");
  
  MetaTags(tags, "wsws", "/", ltMetaTags, true);
  
  public static void MetaTags(MetaTagCollection MetaTags, string name, string strRawURL, Literal ltlMetaHolders, bool isProp)
  {
      //  ltlMetaHolders.Text = "";
  
      foreach (AgentMetaTag oAgentMetaTag in agentMetaTags)
      {
          if (string.Compare(strRawURL, oAgentMetaTag.AgentPageURL, true) == 0)
          {
              if (oAgentMetaTag.MetaTagName.ToLower().Trim() != "footer" &amp;&amp; oAgentMetaTag.MetaTagName.ToLower().Trim() != "title")
              {
                  if (oAgentMetaTag.MetaTagName.ToLower().Trim() == "fbtitle")
                      oAgentMetaTag.MetaTagName = "title";
  
                  RenderMetaTagByContentName(ltlMetaHolders, oAgentMetaTag.MetaTagName, oAgentMetaTag.MetaTagContent, isProp);
              }
          }
      }
  }
  
  public static void RenderMetaTagByContentName(Literal ltlMetaHolder, string contentName, string content, bool isProp)
  {
      var metaTagFromat = isProp ? "&lt;meta property=\"{0}\" content=\"{1}\" /&gt;" : "&lt;meta name=\"{0}\" content=\"{1}\" /&gt; ";
  
      ltlMetaHolder.Text += string.Format(metaTagFromat, contentName, content);
  
  }
  </code></pre>
  
  <p><strong>Following is the second Approach to dynamically handle the Meta Tags.</strong></p>
  
  <pre><code>HtmlMeta tag = new HtmlMeta();
  tag.Attributes.Add("property", "og:title");
  tag.Content = "Title";
  Page.Header.Controls.Add(tag);
  
  HtmlMeta tag1 = new HtmlMeta();
  tag1.Attributes.Add("property", "og:description");
  tag1.Content = "Desc";
  Page.Header.Controls.Add(tag1);
  
  HtmlMeta tagurl = new HtmlMeta();
  tagurl.Attributes.Add("property", "og:url");
  tagurl.Content = "URL info";
  Page.Header.Controls.Add(tagurl);
  
  HtmlMeta tagimg = new HtmlMeta();
  tagimg.Attributes.Add("property", "og:img");
  tagimg.Content = "Image URL";
  Page.Header.Controls.Add(tagimg);
  </code></pre>
  
  <p><strong>Finally it is rendering the meta tags as below..</strong></p>
  
  <pre><code>&lt;meta property="og:title" content="Title" /&gt;
  &lt;meta property="og:description" content="Description" /&gt;
  &lt;meta property="og:url" content="url info" /&gt;
  &lt;meta property="og:image" content="image url" /&gt;
  </code></pre>
  
  <blockquote>
    <p>   </p>
  </blockquote>
  
  <p>Now the moment i click the <code>Like button</code> it only sends the url. and not sending the <code>Description/Image/Title</code>.</p>
  
  <p>I am using the link "http://developers.facebook.com/tools/debug". It says that the <code>Description/Image/Title</code> is missing.</p>
  
  <p>Any Ideas?</p>