saurabhinfosys / my-social-posts
There is no license information available for the latest version (V1.0.0) of this package.
A package to load Instagram and Facebook page posts
V1.0.0
2024-06-07 06:18 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.8.1
README
A PHP package to load Instagram and Facebook page posts.
Installation
Install via Composer:
composer require saurabhinfosys/my-social-posts ## Setup into your project use MySocialPosts\Instagram; use MySocialPosts\Facebook; // Replace with your actual access tokens and page/user IDs $instagramAccessToken = 'YOUR_INSTAGRAM_ACCESS_TOKEN'; $facebookAccessToken = 'YOUR_FACEBOOK_ACCESS_TOKEN'; $facebookPageId = 'YOUR_FACEBOOK_PAGE_ID'; // Instantiate the Instagram class and get posts $instagram = new Instagram($instagramAccessToken); $instagramPosts = $instagram->getPosts(); print_r($instagramPosts); // Instantiate the Facebook class and get posts $facebook = new Facebook($facebookAccessToken); $facebookPosts = $facebook->getPosts($facebookPageId); print_r($facebookPosts);