1. Go to this page and download the library: Download lns/social-feed 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/ */
lns / social-feed example snippets
ns\SocialFeed\Provider\FacebookPagePostsProvider;
use Lns\SocialFeed\Provider\TwitterSearchApiProvider;
use Lns\SocialFeed\Client\TwitterApiClient;
use Lns\SocialFeed\Client\FacebookApiClient;
use Lns\SocialFeed\Factory\FacebookPostFactory;
use Lns\SocialFeed\Factory\TweetFactory;
use Lns\SocialFeed\SocialFeed;
use Lns\SocialFeed\Source;
$socialFeed = new SocialFeed();
$facebookPostFactory = new FacebookPostFactory();
$tweetFactory = new TweetFactory();
$instagramPostFactory = new InstagramPostFactory();
$fbClient = new FacebookApiClient('681945715271604', 'e6f5472a5f159d8f235d9cfc14084b36');
$twitterClient = new TwitterApiClient('HqSutv9oOk64BqyAn474g', 'EdAzOS0RTuMnIQgQPPIM4gv66fwRlyzx2yfqjz9nHtA');
$socialFeed
->addSource(new Source(
new FacebookPagePostsProvider($fbClient, $facebookPostFactory),
['page_id' => '110483805633200']
))
->addSource(new Source(
new TwitterSearchApiProvider($twitterClient, $tweetFactory),
['query' => 'lanetscouade']
));
foreach(new \LimitIterator($socialFeed, 0, 10) as $item) {
echo $item->getMessage() . PHP_EOL;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.