Archive

Category Archives for "Facebook"
8

How To Put A Facebook Like Button On 1000’s Dynamic PHP Pages

 

So you want to put a like button on your site? No problem. Just go the this Facebook developers page and you will see this code creator:
Facebook Like Button Creator

Type in the website address that you want people to like. Click “get code” and voila! Take the code, copy and paste it into the html code in the web page where you want to have the like button and you are set. The like button will be on your website and when people click the like button the website you indicated on the form will be liked.

What if you have a site consisting of php scripts which creates thousands of dynamic webpages? Are you going to make a separate like code for each of the thousands of webpages? I do not think so. This was my problem with my site Articledude.com. Currently there are 327,214 articles each on a separate dynamic page created by the php script. Obviously this would be impossible.

You need the code to place on your desired php page that will create the correct like button for the that specific dynamic php page. Here is the code:

Just copy and paste this code into your php page that creates your dynamic php pages and a like button will appear. When people click on the like button the specific dynamic page will be liked. Go ahead and click on any specific article on Articledude.com and you will see it working. Like a few articles while you are at it! You comments are appreciated.