WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Facebook Like Droplet
  • Print
Pages: [1] 2   Go Down

Author Topic: Facebook Like Droplet  (Read 33128 times)

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Facebook Like Droplet
« on: May 08, 2010, 03:02:07 PM »
Hi,

I found this wordpress plugin and code it to be wb droplet

And the code:
Code: [Select]
$host = $_SERVER['HTTP_HOST'];
$self = $_SERVER['PHP_SELF'];
$query = !empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null;
$url = !empty($query) ? "http://$host$self?$query" : "http://$host$self";

$the_perma = rawurlencode($url);
$the_iframe = '<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href='.$the_perma.'&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:auto;"></iframe></div>';
return $the_iframe;

let me know the impressions..

cheers
« Last Edit: September 02, 2010, 11:18:31 PM by crnogorac081 »
Logged
Web developer

snark

  • Guest
Re: new Droplet: Facebook Like
« Reply #1 on: May 08, 2010, 05:43:25 PM »
hey crnogorac081,

have you seen and tested my soc network droplets

Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: new Droplet: Facebook Like
« Reply #2 on: May 08, 2010, 06:06:48 PM »
yea I did. It is nice. This is kind of different :)
Logged
Web developer

computer351

  • Guest
Re: new Droplet: Facebook Like
« Reply #3 on: May 08, 2010, 10:22:00 PM »
I really like this! Good job!! When can we get it? Thanks, Greg (computer351)
Logged

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: new Droplet: Facebook Like
« Reply #4 on: May 08, 2010, 10:27:07 PM »
Hello Ivan,

This is really cool!

I am courious about the code.

Regards,
Stefek
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: new Droplet: Facebook Like
« Reply #5 on: May 08, 2010, 11:15:26 PM »
Hi Stefek,

There is not much code :) I posted it in first post..

cheers
Logged
Web developer

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: new Droplet: Facebook Like
« Reply #6 on: May 09, 2010, 02:55:46 AM »
Hello Ivan,

Thanks,

regards,
Stefek
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline frankyboy

  • Posts: 122
  • Gender: Male
  • Sächsischer Schlagerstar
    • wXw Wrestling
Re: new Droplet: Facebook Like
« Reply #7 on: May 10, 2010, 04:37:47 PM »
Great Work!
Logged

Offline jollylama

  • Posts: 30
  • Gender: Male
  • that's gonna leave a mark
    • some of my work
Re: new Droplet: Facebook Like
« Reply #8 on: August 08, 2010, 06:42:11 PM »
this could be really great! - however i'm not up to speed on droplets - i'm not sure how to add the code.. and where?

any help or tutorials?

thanks!
Logged

Offline jollylama

  • Posts: 30
  • Gender: Male
  • that's gonna leave a mark
    • some of my work
Re: new Droplet: Facebook Like
« Reply #9 on: August 08, 2010, 09:16:50 PM »
haha - I figured it out!!

Go to: Admin Tools/Droplets

Add Droplet and flop in the code!
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: new Droplet: Facebook Like
« Reply #10 on: August 09, 2010, 01:49:36 PM »
Im glad you like it :)
Logged
Web developer

snark

  • Guest
Re: new Droplet: Facebook Like
« Reply #11 on: September 01, 2010, 05:44:24 PM »
I would like to use this on a newspage but I would like the newstitle to be displayed along with the page title ... is that possible?

Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: new Droplet: Facebook Like
« Reply #12 on: September 01, 2010, 06:19:06 PM »
Hi,

you can try to set the $url parameter to match your page title..

cheers
Logged
Web developer

snark

  • Guest
Re: new Droplet: Facebook Like
« Reply #13 on: September 01, 2010, 10:50:00 PM »
I tried that but that does not zeem to respond
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: new Droplet: Facebook Like
« Reply #14 on: September 02, 2010, 11:16:27 PM »
did you put droplet on long content page ?
Logged
Web developer

snark

  • Guest
Re: Facebook Like Droplet
« Reply #15 on: September 03, 2010, 05:57:17 PM »
yes I did, it makes a correct link towards the page but the text of the link as it is displayed in facebook is only the website-title + the newspage-title .. not the actual news-item-title

Logged

biber.beat

  • Guest
Re: Facebook Like Droplet
« Reply #16 on: March 14, 2011, 10:58:03 PM »
Hey,

I use your droplet but I´m faceing the problem, that the code is NOT tranfering the unique url within the "Like it". Online my main-url will be transfered - no matter on wich page I place the droplet.

What do I wrong?
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Facebook Like Droplet
« Reply #17 on: March 15, 2011, 02:05:49 PM »
I noticed that too, but could not find the solution yet..

maybe facebook doesnt allow you to like pages, but site only..

cheers
Logged
Web developer

biber.beat

  • Guest
Re: Facebook Like Droplet
« Reply #18 on: March 15, 2011, 03:55:20 PM »
I found out that it may has to do something with the open-graph meta-infos.

For example: with "og:image" you can set the thumbnail for Facebook and if you set "og:title" fix - the droplet will deliver this info to Facebook.

Here you can see how it works good: http://www.hasenfarm.com/pages/motive/ein-aug-hase.php
Logged

biber.beat

  • Guest
Re: Facebook Like Droplet
« Reply #19 on: March 17, 2011, 12:34:17 AM »
Hey! If you set the following Open-Graph-Meta-Infos the droplet is working fine:

   <meta property="og:image" content="absolute_path_to_pi cture.jpg/>
   <meta property="og:title" content="<?php page_title(); ?>"/>
   <meta property="og:site_name" content="<?php page_title(); ?>"/>
   <meta property="og:description" content="<?php page_description();?"/>

Unfortunally I could not figure out why I have to set an image. Otherwise none-relevant pictures are send to the wall-posting on facebook.
Logged

herojohan

  • Guest
Re: Facebook Like Droplet
« Reply #20 on: November 13, 2011, 12:05:08 AM »
This is extremly handy!


Thank you!
Logged

Offline Bug

  • Posts: 237
Re: Facebook Like Droplet
« Reply #21 on: November 13, 2011, 03:29:18 AM »
Does the facebook like script provided by addthis work as it should or does that give the same result
Logged

jacobi22

  • Guest
Re: Facebook Like Droplet
« Reply #22 on: February 04, 2012, 07:30:08 PM »
english:
here a resolution without W3C-Errors. the internet explorer need the code "allowTransparency="true"" to display the iframe transparent, but allowTransparency is not W3C-conform

german:
die W3C-Prüfung gibt einen Fehler für allowTransparency aus. der Internet-Explorer benötigt aber diese Angabe. Ohne allowTransparency würde die Box mit schwarzen bzw. weißen Hintergrund dargestellt.
Um den Fehler abzustellen, fügt man eine Abfrage ein, welcher Browser verwendet wird und verwendet je nach Antwort einen Code für den IE (mit allowTransparency) oder für alle anderen Browser ohne allowTransparency

Hier der geänderte Droplet-Code
Code: [Select]
$host = $_SERVER['HTTP_HOST'];
$self = $_SERVER['PHP_SELF'];
$query = !empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null;
$url = !empty($query) ? "http://$host$self?$query" : "http://$host$self";

$the_perma        = rawurlencode($url);
$the_iframe        = '<div id="facebook_like"><!--[if IE]><iframe src="http://www.facebook.com/plugins/like.php?href='.$the_perma.'&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:auto;"></iframe></iframe><![endif]--><iframe src="http://www.facebook.com/plugins/like.php?href='.$the_perma.'&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:auto;"></iframe><!--<![endif]--></div>';
return $the_iframe;
« Last Edit: February 04, 2012, 08:16:30 PM by jacobi22 »
Logged

Offline sky writer

  • Posts: 926
Re: Facebook Like Droplet
« Reply #23 on: February 05, 2012, 02:23:47 PM »
I still get an error:
Quote
Validation Output: 1 Error

    Error Line 120, Column 55: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

    …lign: center;"><div id="facebook_like"><!--[if IE]><iframe src="http://www.fac…

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

I also have a question about:

Quote from: biber.beat on March 17, 2011, 12:34:17 AM
Hey! If you set the following Open-Graph-Meta-Infos the droplet is working fine:

   <meta property="og:image" content="absolute_path_to_pi cture.jpg/>
   <meta property="og:title" content="<?php page_title(); ?>"/>
   <meta property="og:site_name" content="<?php page_title(); ?>"/>
   <meta property="og:description" content="<?php page_description();?"/>

Unfortunally I could not figure out why I have to set an image. Otherwise none-relevant pictures are send to the wall-posting on facebook.

How and where do you add this code?  What do you enter for "absolute_path_to_pi cture.jpg"
« Last Edit: February 05, 2012, 02:25:19 PM by sky writer »
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Facebook Like Droplet
« Reply #24 on: February 05, 2012, 10:13:44 PM »
Hi,

my portal was kind of perfect (with no errors at all) before facebook and open graph tags appeared :) , and now I am not considering those errors any more.. 

Abs. path to picture is: www.yoursite.xy/media/folder/picture.jpg

take a look at tags on my portal: www.mondocafe.me

cheers,
Ivan
Logged
Web developer

  • Print
Pages: [1] 2   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Facebook Like Droplet
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2