This code is outdated. Before using it, you probably will have to rewrite some parts of the code. We keep it here for future reference (if needed).
A simple PHP Class to retrieve public stream from Social Networks.
Every single Social Network stream is implemented by an Adapter of a simple Interface that loads the Posts using its own API.
1.0.0
- Youtube
The Class will return a key => value Array ordered by post date.
Social Wall uses official external SDK Libs for:
SocialWall is very easy to use:
- Include the library
require_once('SocialWall.php');
- Setup your configuration
$limit = 10;
$social_config = array(
'facebook'=>array(
'id'=>'facebook_id',
'limit'=>$limit,
'api_key' => 'your_api_key',
'api_secret'=> 'your_api_secret',
'app_token'=> 'your_app_token'
),
'twitter'=>array(
'id'=>'twitter_username',
'limit'=>$limit,
'media_size' => 'medium',
'access_token' => 'your_access_token',
'access_token_secret' => 'your_access_token_secret',
'consumer_key' => 'your_consumer_key',
'consumer_secret' => 'your_consumer_secret'
),
'youtube'=>array(
'id'=>'youtube_id',
'limit'=>$limit,
'api_key' => 'your_api_key'
),
'instagram' => array(
'id'=>'instagram_id',
'limit'=>$limit,
'client_id' => 'your_client_id',
'client_secret' => 'your_client_secret'
)
);
- Then init the class
$socialwall = new SocialWall();
$socialwall->setLogEmail("debug@yoursite.com");
- And that's all! Now you can call the "load" method
$posts = $socialwall->load($social_config);
Feel free to fork this project and contribute implementing others Adapters.
Made with ♥ in FillStudio by Aldo Zorzi & Emanuele Tortolone.