Simple Authentication for Symfony using Facebook Login

Following on from anĀ earlier post, facebook changed the way you authenticate with their site.

The steps to authenticate have not changed too much, and the only change is to part 4.

  1. Create a new facebook application
  2. Add your website URL to it
  3. Add the facebook Login link to your page
  4. Process the return visit from facebook

Continue reading Simple Authentication for Symfony using Facebook Login

Simple Authentication for Symfony using Facebook Login

A few days ago I set about the task of writing an authentication system for DropoutUK based around Facebook Connect / Facebook Login Button. I was pleasantly surprised to learn just how simple it seems to be these days, compared to the first implementation I played with back in 2009. Which, OK is 2 years now, but the new social plugins make life so much easier.

So what is involve? Just 4 simple actions

  1. Create a new facebook application
  2. Add your website URL to it
  3. Add the facebook Login Button to the page
  4. Check for the facebook cookie and process a login action if possible.

Continue reading Simple Authentication for Symfony using Facebook Login

How to add facebook like to an InVision forums template

Adding facebook like to an InVision forums template turned out to be very easy, but it did take me over an hour to work out how. As a result I thought it best to share this code sample to save others hours of google’ing for the answer or banging their head against the table for as long as I did.

Initially I thought it would be as easy to add a short block of PHP to a template file so I tried to use:

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>

Continue reading How to add facebook like to an InVision forums template