1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem with wordpress/facebook

Discussion in 'Blogging' started by flashgordon88, Dec 8, 2011.

  1. flashgordon88

    flashgordon88 Registered Member

    Joined:
    Jul 7, 2011
    Messages:
    77
    Likes Received:
    5
    Hey guys,

    I have a strange problem. I recently made a website and whenever I click on the facebook like button, it displays the original title and text instead of the one I wrote. What I mean is that the message in the facebook profile is the wrong one. What can I do?

    My site is http://www.profilspion.de

    and this is what it displays in your profile:

    [​IMG]

    what can I do? there is no cache?
     

    Attached Files:

  2. Funkychicken

    Funkychicken Newbie

    Joined:
    May 15, 2011
    Messages:
    36
    Likes Received:
    15
    You need to use OpenGraph tags to specify exactly what text, title and image to use in your Like dialog. I can't post links yet, but go to the Developers part of Facebook and look for the section under Core Concepts about the Like button, and scroll down to part 2 Open Graph Tags. You can generate the meta code there, and then add it to the header.php file in Wordpress.

    Wordpress is a bit limited for this because your header.php serves your whole site, so if you want different Like data for other pages you'll have to get creative with serving different header files depending on the page.
     
  3. flashgordon88

    flashgordon88 Registered Member

    Joined:
    Jul 7, 2011
    Messages:
    77
    Likes Received:
    5
    hey thanks funkychicken!

    I added these lines in my header file:

    PHP:
    <title>The Rock (1996)</title>
        <
    meta property="og:title" content="The Rock"/>
        <
    meta property="og:type" content="movie"/>
        <
    meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
        <
    meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
        <
    meta property="og:site_name" content="IMDb"/>
        <
    meta property="fb:admins" content="USER_ID"/>
        <
    meta property="og:description"
              
    content="A group of U.S. Marines, under command of
                       a renegade general, take over Alcatraz and
                       threaten San Francisco Bay with biological
                       weapons."
    />
    to see if it works, but it still doesnt?
     
  4. anaindasky

    anaindasky Newbie

    Joined:
    Dec 8, 2011
    Messages:
    23
    Likes Received:
    0
    yeah, this bugged me too for quite a while. funkychicken, your answer is spot on ;)
     
  5. flashgordon88

    flashgordon88 Registered Member

    Joined:
    Jul 7, 2011
    Messages:
    77
    Likes Received:
    5
    why is it not working for me? ughghghgghhgh :(