SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2008
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    meta property attribute for facebook like button

    I've been trying to use the facebook 'like' plug in, and have trouble with the
    Code HTML4Strict:
    <meta property="">
    not validating.
    Being a relative beginner the facebook forum at http://forum.developers.facebook.com...php?pid=233572 is no help at all. Can somebody please explain this in simple terms. After all facebook tell us that the plug ins are really simple to use!!

  2. #2
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Well based on your source code I can see what's potentially wrong, the meta element itself will require both a name and a content attribute as below:

    Code HTML4Strict:
    <meta name="" content="">

    If however the thing you're using makes use of XHTML rather than HTML, you need to ensure that the element is closed properly with the / before the closing bracket:

    Code HTML4Strict:
    <meta name="" content="" />

    If it's still giving you an error I recommend putting it through the W3C validator (http://validator.w3.org/).

    Having meta with property="" will cause errors because property isn't a valid attribute in HTML.

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2008
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is precisely the problem. Facebook stipulate that you have to use meta with property= instead of name= ; for example <meta property="og:title" content="The Rock" />


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •