Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 09:00:20 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155535 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1] 2   Go Down
Print
Author Topic: Facebook Like Droplet  (Read 5123 times)
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« on: May 08, 2010, 02:02:07 PM »

Hi,

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

And the code:
Code:
$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, 10:18:31 PM by crnogorac081 » Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
« Reply #1 on: May 08, 2010, 04:43:25 PM »

hey crnogorac081,

have you seen and tested my soc network droplets

Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #2 on: May 08, 2010, 05:06:48 PM »

yea I did. It is nice. This is kind of different Smiley
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
computer351

Offline Offline

Posts: 1


WWW
« Reply #3 on: May 08, 2010, 09:22:00 PM »

I really like this! Good job!! When can we get it? Thanks, Greg (computer351)
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #4 on: May 08, 2010, 09:27:07 PM »

Hello Ivan,

This is really cool!

I am courious about the code.

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #5 on: May 08, 2010, 10:15:26 PM »

Hi Stefek,

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

cheers
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #6 on: May 09, 2010, 01:55:46 AM »

Hello Ivan,

Thanks,

regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
frankyboy

Offline Offline

Posts: 113



WWW
« Reply #7 on: May 10, 2010, 03:37:47 PM »

Great Work!
Logged

Disko-King.de
jollylama

Offline Offline

Posts: 29



WWW
« Reply #8 on: August 08, 2010, 05: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
jollylama

Offline Offline

Posts: 29



WWW
« Reply #9 on: August 08, 2010, 08:16:50 PM »

haha - I figured it out!!

Go to: Admin Tools/Droplets

Add Droplet and flop in the code!
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #10 on: August 09, 2010, 12:49:36 PM »

Im glad you like it Smiley
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
« Reply #11 on: September 01, 2010, 04: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
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #12 on: September 01, 2010, 05:19:06 PM »

Hi,

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

cheers
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
« Reply #13 on: September 01, 2010, 09:50:00 PM »

I tried that but that does not zeem to respond
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #14 on: September 02, 2010, 10:16:27 PM »

did you put droplet on long content page ?
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
« Reply #15 on: September 03, 2010, 04: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

Offline Offline

Posts: 45


« 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
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« 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

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
biber.beat

Offline Offline

Posts: 45


« 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

Offline Offline

Posts: 45


« 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

Offline Offline

Posts: 12


« Reply #20 on: November 13, 2011, 12:05:08 AM »

This is extremly handy!


Thank you!
Logged
Bug

Offline Offline

Posts: 188


« 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
Betatester
*
Offline Offline

Posts: 1374


WWW
« 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:
$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

LG Uwe

Wer sagt, Reichtum ist alles, hat nie ein Kind lächeln gesehen.
sky writer

Offline Offline

Posts: 285



« 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:

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
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« 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 Smiley , 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

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [1] 2   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!