Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Facebook 'Like' button on Website
New Posts  All Forums:Forum Nav:

Facebook 'Like' button on Website

post #1 of 3
Thread Starter 
I'm trying to add a 'Like' button on my website, so that people are able to like and view my Facebook page to stay up to date.

I've used the Facebook Developer's site to generate the code for the button.

The page I'm trying to set it up for is this;
http://www.facebook.com/pages/Daniel...4196573930505/

When I generate the code, I'm given two options; either 'iFrame'
Code:
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FDaniel-Piercy-Media%2F194196573930505%2F&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=dark&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
or 'XFBML'
Code:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/pages/Daniel-Piercy-Media/194196573930505/" show_faces="false" width="450" colorscheme="dark"></fb:like>

I've copy and pasted the code directly into Dreamweaver and neither of them work. Well, they work when I test them locally. So I paste the code in and hit F12 to preview and it works! However, when I upload it to my host and view it online, it doesn't; I don't get it.

Here's the site I want it to appear on;
www.danielpiercy-media.co.uk

Any help is much appreciated
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K ASUS P8P67 Pro GTX 560Ti 2GB & 8800GTS G92 512MB for PhysX 16GB Kingston HyperX 
Hard DriveOSMonitorPower
Corsair M4 128GB SSD + 1TB WD Windows 7 Pro 64bit 24" Acer & two 19" Samsungs Corsair 650TX 
Case
CM HAF 922 
  hide details  
Reply
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K ASUS P8P67 Pro GTX 560Ti 2GB & 8800GTS G92 512MB for PhysX 16GB Kingston HyperX 
Hard DriveOSMonitorPower
Corsair M4 128GB SSD + 1TB WD Windows 7 Pro 64bit 24" Acer & two 19" Samsungs Corsair 650TX 
Case
CM HAF 922 
  hide details  
Reply
post #2 of 3
The iframe code works fine I've just hosted it, you have 22 likes btw.
When you run the hosted page clear cache etc just to make sure there's no caching problem.
Then, check with your host as to why they wont allow external content into the iframe from facebook.
    
CPUMotherboardGraphicsRAM
I7 920 Gigabyte EX58 XFX Radeon 4870 X2 6GB Corsair 
Hard DriveOptical DriveOSMonitor
500GB Maxtor LG DVDRW Vista Ultimate x64 2 x Edge IO 22" 
KeyboardPowerMouseMouse Pad
Razer Arctosa XFX 800w BTC Cheetah Gaming Mouse None 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
I7 920 Gigabyte EX58 XFX Radeon 4870 X2 6GB Corsair 
Hard DriveOptical DriveOSMonitor
500GB Maxtor LG DVDRW Vista Ultimate x64 2 x Edge IO 22" 
KeyboardPowerMouseMouse Pad
Razer Arctosa XFX 800w BTC Cheetah Gaming Mouse None 
  hide details  
Reply
post #3 of 3
Thread Starter 
Thanks, man.

For some reason the host wasn't allowing it, so I've changed hosts and it's working now! Thanks again.
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K ASUS P8P67 Pro GTX 560Ti 2GB & 8800GTS G92 512MB for PhysX 16GB Kingston HyperX 
Hard DriveOSMonitorPower
Corsair M4 128GB SSD + 1TB WD Windows 7 Pro 64bit 24" Acer & two 19" Samsungs Corsair 650TX 
Case
CM HAF 922 
  hide details  
Reply
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K ASUS P8P67 Pro GTX 560Ti 2GB & 8800GTS G92 512MB for PhysX 16GB Kingston HyperX 
Hard DriveOSMonitorPower
Corsair M4 128GB SSD + 1TB WD Windows 7 Pro 64bit 24" Acer & two 19" Samsungs Corsair 650TX 
Case
CM HAF 922 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Facebook 'Like' button on Website