Download the PHP package alexok/instagram-sdk-php without Composer
On this page you can find all versions of the php package alexok/instagram-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package instagram-sdk-php
Instagram-SDK-PHP
This is an unofficial SDK for the Instagram Private API in PHP
Motivation
I decided to build this because most libraries for the Instagram Private API I have come across aren't OOP based and are difficult to use.
Donations
If you like this project, please consider donating towards my coffee addiction fund, so I can continue to push commits!
- Paypal: Donate
- Bitcoin: 1814x9kioBxPDBCQx8oaty7e6Z3DAosucd
Installation
Composer
If you want to test code that is in the master branch, which hasn't been pushed as a release, you can use dev-master
.
Don't have Composer?
What?! Grab it here: https://getcomposer.org/
Examples
Examples can be seen in the examples folder.
Usage
Login
Read: Session Management, to avoid calling login
in each script.
Timeline Feed
$maxId
:string
(Optional) Used for Pagination
User Feed
$userId
:string|User
User or User Id to get Feed of$maxId
:string
(Optional) Used for Pagination
My User Feed
$maxId
:string
(Optional) Used for Pagination
Liked Feed
$maxId
:string
(Optional) Used for Pagination
Tag Feed
$tag
:string
Tag$maxId
:string
(Optional) Used for Pagination
Location Feed
$locationId
:string|Location
Location or Location Id to get Feed of$maxId
:string
(Optional) Used for Pagination
User Tags Feed
$userId
:string|User
User of User Id to get Tags Feed of$maxId
:string
(Optional) Used for Pagination
Like Media
$mediaId
:string|FeedItem
FeedItem or FeedItem Id to Like
Unlike Media
$mediaId
:string|FeedItem
FeedItem or FeedItem Id to Unlike
Delete Media
$mediaId
:string|FeedItem
FeedItem or FeedItem Id to Delete$mediaType
:int
Media Type (Constants available inDeleteMediaRequest
class)
Comment on Media
$mediaId
:string|FeedItem
FeedItem or FeedItem Id to Comment on$comment
:string
Comment
Get Media Comments
$mediaId
:string|FeedItem
FeedItem or FeedItem Id of Media to get Comments from$maxId
:string
(Optional) Used for Pagination
Delete Media Comments
$mediaId
:string|FeedItem
FeedItem or FeedItem Id to Delete Comments from$commentIds
:array
Comment Ids to Delete
User Info
$userId
:string|User
User or User Id to get Info of
User Followers
$userId
:string|User
User or User Id to get Followers of$maxId
:string
(Optional) Used for Pagination
User Following
$userId
:string|User
User or User Id to get Following of$maxId
:string
(Optional) Used for Pagination
GeoMedia
$userId
:string|User
User or User Id to get GeoMedia of
Media Info
$mediaId
:string|FeedItem
FeedItem or FeedItem Id to get Info of
Current User Account
Edit User Profile
$firstname
:string
First Name$email
:string
Email$phoneNumber
:string
Phone Number$gender
:int
Gender (Constants available inUser
class)$biography
:string
: Biography$externalUrl
:string
External Url
Set Account Public
Set Account Private
Show Friendship
$userId
:string|User
User or User Id to show Friendship between
Follow User
$userId
:string|User
User or User Id to Follow
Unfollow User
$userId
:string|User
User or User Id to Unfollow
Block User
$userId
:string|User
User or User Id to Block
Unblock User
$userId
:string|User
User or User Id to Unblock
Search Tags
$query
:string
Tag to Search for
Search Users
$query
:string
User to Search for
Search Places (Facebook)
-
$query
:string
Place to Search for $latitude
:string
Latitude$longitude
:string
Longitude
Change Profile Picture
$path
:string
File path of Profile Picture to Upload
Remove Profile Picture
Post Photo
$path
:string
File path of Photo to Post$caption
:string
Caption for this Photo
Edit Media
$mediaId
:string|FeedItem
FeedItem or FeedItem Id to Edit$caption
:string
Caption for this Media
Get User by Username
$username
:string
Username to find User by
Logout
Session Management
To avoid logging in each time, you can use the saveSession
and initFromSavedSession
methods.
Script 1:
Script 2:
Extras
Pagination
Some Instagram endpoints return paginated data.
To access the next page of data, you will need to get the next maximum ID from the response object and pass it into the same method as the nextMaxId
parameter.
Example:
Proxy
Use a Proxy between your Server and the Instagram API
Optional Username/Password Authentication
Enable or Disable Peer Verification, for testing with Charles Proxy etc.
TODO
- Inbox
- Direct Share
- Recent Activity
- Register new Accounts
- Upload and Post Videos
Contributing
If you would like to contribute to this project, please feel free to submit a pull request.
Before you do, take a look at the issues to see if the functionality you want to contribute to is already in development.
License
MIT
Legal
The name "Instagram" is a copyright of Instagram, Inc.
This project is in no way affiliated with, authorized, maintained, sponsored or endorsed by Instagram, Inc or any of its affiliates or subsidiaries.
I, the project owner and creator, am not responsible for any legalities that may arise in the use of this project. Use at your own risk.
All versions of instagram-sdk-php with dependencies
ext-curl Version *
php-curl-class/php-curl-class Version ^4.11
netresearch/jsonmapper Version ^0.11.0
ramsey/uuid Version ^3.4