Download the PHP package amirsarhang/instagram-php-sdk without Composer
On this page you can find all versions of the php package amirsarhang/instagram-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download amirsarhang/instagram-php-sdk
More information about amirsarhang/instagram-php-sdk
Files in amirsarhang/instagram-php-sdk
Package instagram-php-sdk
Short Description It's Instagram Graph SDK for PHP. With this package you can easily make all requests to Instagram Graph API, like Auth and CRUD. Also, we will have more methods regularly.
License MIT
Homepage https://github.com/amirsarhang/instagram-php-sdk
Informations about the package instagram-php-sdk
amirsarhang/instagram-php-sdk
It's Instagram Graph SDK for PHP.
With this package you can easily make all requests to Instagram Graph API, like Auth and CRUD. Also, we will have more methods regularly.
This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you are expected to uphold this code.
Installation
The preferred method of installation is via Composer. Run the following
command to install the package and add it as a requirement to your project's
composer.json
:
Or add the following to your composer.json file:
Documentation
Requirements
PHP Version | Package Version |
---|---|
>= 7.0 |
1.x |
>= 8.0 |
2.x |
*Please remember that you need verified Facebook APP to use this sdk.
FACEBOOK_APP_ID
FACEBOOK_APP_SECRET
Configuration
Put these values in your .env file:
Auth & Login
- Please remember that your added permissions need verified by Facebook.
Here you can find Facebook Permissions.
Generate & Save User Access Token in your Database.
Then we are ready to generate our page access token, but first we should get all selected page by user, then show them to your user to select which page's access token should be save in Database.
Sample Response
After storing selected page data by user in your database, then you need to call subscribeWebhook()
to register this page for get real time Events.
Check this link for more details about page subscriptions.
Usage
- If your request is on graphEdge, you can pass
true
on$instagram->get($endpoint, true)
as second parameter.
Methods
Comment Methods
Get Comment Data
Add Comment
Delete Comment
Hide & UnHide Comment
Messaging Methods
Get Message Data
Send Text Message (Direct Message)
Send Media Message (Direct Message)
I will add more Useful methods as soon as possible :)
Check out the documentation website for detailed information and code examples.
Contributing
Contributions are welcome! Please read CONTRIBUTING for details.
Copyright and License
The amirsarhang/instagram-php-sdk library is copyright © [Amirhossein Sarhangian]() and licensed for use under the MIT License (MIT). Please see LICENSE for more information.