Jump to content

Help with Facebook LIKE/SHARE buttons


BuildMyWeb

Recommended Posts

I have placed the Facebook LIKE/SHARE buttons on a website using the following:

<div class="fb-like" data-href="http://mysite.com" data-layout="standard" data-action="like" data-show-faces="false" data-share="true" data-width="280px"></div>

the LIKE button works fine.  the SHARE button works but i cannot seem to customize and of the values such as which image to include.  i have the following in my HEAD section but it does nothing.  do i need to create an APP and reference the ID?  any help is much appreciated

<meta property="og:type" content="website" />
    <meta property="og:title" content="Can tea make for a happy marriage" />
    <meta property="og:url" content="http://mysite.com/index.php" />
    <meta property="og:image" content="http://mysite.com/pics/gallery/2.jpg" />
Link to comment
https://forums.phpfreaks.com/topic/291337-help-with-facebook-likeshare-buttons/
Share on other sites

Usually there is a bit of JavaScript that you are supposed to put just below the Body tag. Did you place that bit? If you did not then your button will not work.

 

As for any type of css styling unfortunately Facebook has recently dumped the ability for anyone to "adjust" css or attributes to the like box or buttons. So if you want to change say the border line that always appears white even on a black background when you chose the "Dark" box you are out of luck un less you use another solution. The same might be the case with like/share buttons.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.