A simple CakePHP component that uses the Facebook PHP SDK (https://github.com/facebook/facebook-php-sdk).
Setup the component like this:
public $components = array( 'Facebook' => array( 'appId' => 'xxx', 'secret' => 'xxx', 'cookie' => true, 'fileUpload' => 1, 'canvas' => 1, 'fbconnect' => 1, 'display' => 'page', 'scope' => 'user_about_me,email,publish_actions,publish_stream,photo_upload', 'redirect_uri' => 'https://www.facebook.com/pages/My-Test-Page/12345?id=12345&sk=app_12345' ) ); |
Then you should be able to do this in your controllers:
debug($this->userProfile); debug($this->loginUrl); debug($this->logoutUrl); debug($this->hasLiked); debug($this->signed_request); |
Grab it from Github: https://github.com/wenbert/CakePHP-Facebook-Component