#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    113
    Rep Power
    16

    Facebook Like button


    Ok here it goes. Let me preface what i'm about to ask with I don't use facebook and have a bit of a hate on for it. That being said I've been instructed to add a like button to some very minor events my employer hosts.

    All I want to do is have a like button with a picture, blurb and title. Can I do this without signing up for a developer account and setting this stuff up on facebook... I guess what i'm asking is do I need an app-id?

    All I want to do is let people click "like" when did this become so convoluted!

    Thanks,
    DSFX
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    3
    Rep Power
    0

    Facebook like button


    Search in google i think you can get it.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    113
    Rep Power
    16
    Oh so since nobody seemed to know, here is what I had to do.

    In my header I had to set the page encoding in ColdFusion and HTML. When I set it in just HTML it didn't work.
    Code:
    <cfprocessingdirective
        pageencoding = "utf-8"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <META HTTP-EQUIV="Content-Language" CONTENT="en-US">

    Then I populated the facebook OG fields in my header. I'm linking to a website so my fields my be different than yours. Note the http:// in all the url's. This is what was causing me the problems. You must include it.
    Code:
    <meta property="og:title" content="#metasel.title#" />
      <meta property="og:type" content="website" />
      <meta property="og:url" content="http://#cgi.SERVER_NAME##cgi.SCRIPT_NAME#?id=#url.id#" />
      <meta property="og:image" content="http://#cgi.SERVER_NAME#/about/uploads/calendar/#metasel.file#" />
      <meta property="og:description" content="#REReplace(metasel.description,'<[^>]*>','','all')#" />
    And to check everything works I used this:
    https://developers.facebook.com/tools/debug/

    The frustrating part was it would validate fine and say it was going to load the proper content but would load the wrong content into the Facebook, so you can't always trust it.

    Anyways I hope this helps somebody coming to the form with similar issues because being told to look it up on google was what I was doing in the first place.

    DSFX.

IMN logo majestic logo threadwatch logo seochat tools logo