PHP code example of webtechnick / cakephp-facebook-plugin

1. Go to this page and download the library: Download webtechnick/cakephp-facebook-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webtechnick / cakephp-facebook-plugin example snippets

 echo $this->Facebook->html(); 
 echo $this->Facebook->init(); 
 echo $this->Facebook->html(); 
 echo $title_for_layout 
 echo $content_for_layout; 
 echo $this->Facebook->init(); 
 echo $this->Facebook->login() 
 echo $this->Facebook->login(array('perms' => 'email,publish_stream')); 
 echo $this->Facebook->logout() 
 echo $this->Facebook->registration(); 
 echo $this->Facebook->registration(array(
		'fields' => 'name,gender,location,email',
		'width' => 600,
		'redirect-uri' => 'http://www.example.com/process_facebook_registration'
	)); 
 echo $this->Facebook->logout(array('label' => 'Logout', 'redirect' => array('controller' => 'users', 'action' => 'logout'))); 
 echo $this->Facebook->logout(array('redirect' => array('controller' => 'users', 'action' => 'logout'), 'img' => '/Facebook/img/facebook-logout.png')); 
 echo $this->Facebook->comments(); 
 echo $this->Facebook->picture($facebook_id); 
 echo $this->Facebook->recommendations(); 
 echo $this->Facebook->like(); 
 echo $this->Facebook->livestream(); 
 echo $this->Facebook->activity(); 
 echo $this->Facebook->friendpile();