PHP code example of rakshazi / social2atom

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

    

rakshazi / social2atom example snippets



= "https://vk.com/apiclub"; //VK group url
$s2a = new \Rakshazi\Social2Atom;
$s2a->setConfig(array(
    'general.audio.enclosure' => false, //Add audio files as post content, not as atom entry element (recommended)
    //For VK.com (Only if you really need it)
    'vk.count' => 100, //Maximum count of posts per feed
    'vk.token' => 'YOUR TOKEN', //Needed only for video and audio
    //For Facebook.com (Only if you really need it)
    'facebook.count' => 100,
    'facebook.token' => 'YOUR TOKEN', //Needed for all, use App Token
));
$atomFeedXML = $s2a->convert($url);

echo $atomFeedXML;