FacebookAuthenticate – Database-less version has arrived.

December 19th, 2011 § 0 comments § permalink

FacebookAuthenticate – now database-less!

So not everybody’s going to what to maintain a User model. Perhaps all they want is just plain old Facebook Authentication whereby the user’s details are returned from Facebook and then stored in session. Well, now it’s possible.

I’ve created a database-less branch of FacebookAuthenticate. No database setup, no adding Facebook user_id & token fields – just plain old session storage for the current user.

The branch also includes a few updates that were made to the handler recently. Bonus.

Get the code over on my GitHub.

Yahoo PlaceFinder DataSource for CakePhp 2

December 14th, 2011 § 0 comments § permalink

Need the coordinates of a location anywhere on Earth? Or how about the place name of any coordinates you provide? The Yahoo PlaceFinder datasource provides a familiar CakePhp interface for interacting with the Yahoo API.

Typical usage looks like this:

$results = $this->Location->find('all', array(
  'conditions' => array(
    'location' => $this->request->data['Location']['location'],
    'flags' => 'JE',
    'gflags' => 'ACR',
  )
));

It’s worth checking out Yahoo’s docs for the various request parameters.

The first version is over on GitHub! Get it here.

FacebookAuthenticate – Facebook authentication handler for CakePhp 2

December 6th, 2011 § 1 comment § permalink

Built to work with the AuthComponent using the recommended approach for building custom authentication handlers.

The purpose of the Facebook Authentication Handler is to provide Facebook Authentication for your CakePHP 2.0 or later based application. The handler has been built following Cake’s recommended approach for building custom authentication objects for use with the built in AuthComponent.
The handler itself is part a FacebookAuth plugin, though this is essentially to make the handler easily redistributable with example configuration settings and an example controller detailing a typical use case scenario.

It should be noted that though this handler stores the access token returned by Facebook, it does not currently provide a means to makes calls to the Graph API. It’s function is to provide authentication. Of course, you could use the access token and your preferred method to communicate with Facebook.

The first version is over on GitHub! Get it here.

A really simple Facebook “Fan / Like Gate” written in PHP

November 8th, 2011 § 0 comments § permalink

What? You’re not using a fan / like / reveal gate?

Well, apparently you should be.

It’s really easy if all you want to do is find out if the current user has liked the page or not. I’ve packaged it up into an index file that…

  1. Decodes the signed request that Facebook sends – this contains the like status.
  2. Renders a view depending on the like status.

 

What is it?

It’s one of those Facebook pages where you have to like the page before you’re allowed to see the hidden content. You know, like the classic Coca-Cola one*.

 

Where can I get it?

On MozMorris over on GitHub.

 

* it was there the last time I looked.

 

 

 

 

 

 

 

 

Where Am I?

You are currently browsing the Codez category at Blog of Moz Morris Freelance Web Developer.

Social Widgets powered by AB-WebLog.com.