PHP code example of phonetworks / pho-kernel

1. Go to this page and download the library: Download phonetworks/pho-kernel 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/ */

    

phonetworks / pho-kernel example snippets

 -a



echo $founder; // will dump the founder's ID.
echo $graph; // will dump the graph's ID.

$tweet = $founder->post("My first tweet"); // let's create a tweet.

$new_user = new \PhoNetworksAutogenerated\User($kernel, $graph, "my_password"); // let's create our first user object.
$new_user->like($tweet); // the user likes the one and only tweet in the graph.

// Now examine these:
var_dump($tweet->getLikers());
var_dump($tweet->getAuthors());
var_dump($new_user->getLikes());
var_dump($founder->getPosts());