Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-29-2012, 12:52 AM   PM User | #1
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
facebook like

Hi i have no idea where to post my question ...

HM.. i am curios about how can i help facebook to take the logo of my site to facebook like plugin as you can see on the picture from facebook there is just white space



i am using this plugin

PHP Code:
 <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];?>&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=150" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px;float: left; height:150px;" allowtransparency="true"></iframe>
Trki is offline   Reply With Quote
Old 10-29-2012, 02:10 AM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,587
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
As far as I remember you need a few OpenGraph meta tags, and use their API in general rather than the simple iframe widget.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 10-29-2012, 09:55 AM   PM User | #3
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
As far as I remember you need a few OpenGraph meta tags, and use their API in general rather than the simple iframe widget.
Hm.. i am confused... i added this meta to index header

<meta property="og:image" content="http://domain/images/fb_avatar.png"/>
<meta property="og:title" content="<?php echo $_SERVER['REQUEST_URI'];?>"/>
<meta property="og:url" content="<?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];?>"/>
<meta property="og:site_name" content="My nick"/>


And in file where i want to display it


<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div style='float: left;'class="fb-like" data-href="<?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];?>" data-send="false" data-width="450" data-show-faces="true"></div>

But still not working it still dont display the meta image from your link
Trki is offline   Reply With Quote
Old 10-29-2012, 10:52 AM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,587
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
It should. Sometimes it takes a while for Facebook to pick that up. I remember having changed the Facebook image of a site a while ago, and FB would still show the old image for quite some time. Don’t know if it’s session cookies or Facebook crawlers, possibly the latter one. Just give it some time.

Oh, and don’t forget to add the OpenGraph scheme URI to the html tag.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 10-29-2012, 05:21 PM   PM User | #5
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
It should. Sometimes it takes a while for Facebook to pick that up. I remember having changed the Facebook image of a site a while ago, and FB would still show the old image for quite some time. Don’t know if it’s session cookies or Facebook crawlers, possibly the latter one. Just give it some time.

Oh, and don’t forget to add the OpenGraph scheme URI to the html tag.
Okay i will wait.. hm... what i shouldn't forget? could please try to insert it to my code because i dont know exactly what u mean :P
Trki is offline   Reply With Quote
Old 10-29-2012, 06:49 PM   PM User | #6
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,587
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
When I did this I needed to add
Code:
<html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" …
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 10-29-2012, 06:51 PM   PM User | #7
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
When I did this I needed to add
Code:
<html xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" …
And how looks the full code? :P i see just start of code and when i looked to this site you sent me it's not there :P
Trki is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:44 PM.


Advertisement
Log in to turn off these ads.