Instagram API class API Documentation: http://instagram.com/developer/ Class Documentation: https://github.com/cosenary/Instagram-PHP-API/tree/dev
- Author: Christian Metz
- Copyright: Christian Metz - MetzWeb Networks 2011-2014
- License: BSD http://www.opensource.org/licenses/bsd-license.php
Synopsis
class Instagram
{
- // constants
- const API_URL = 'https://api.instagram.com/v1/';
- const API_OAUTH_URL = 'https://api.instagram.com/oauth/authorize';
- const API_OAUTH_TOKEN_URL = 'https://api.instagram.com/oauth/access_token';
- // members
- private $_apikey;
- private $_apisecret;
- private $_callbackurl;
- private $_accesstoken;
- private array $_scopes = ;
- private array $_actions = ;
- // methods
- public void __construct()
- public string getLoginUrl()
- public mixed searchUser()
- public mixed getUser()
- public mixed getUserFeed()
- public mixed getUserMedia()
- public mixed getUserLikes()
- public mixed getUserFollows()
- public mixed getUserFollower()
- public mixed getUserRelationship()
- public mixed modifyRelationship()
- public mixed searchMedia()
- public mixed getMedia()
- public mixed getPopularMedia()
- public mixed searchTags()
- public mixed getTag()
- public mixed getTagMedia()
- public mixed getMediaLikes()
- public mixed getMediaComments()
- public mixed addMediaComment()
- public mixed deleteMediaComment()
- public mixed likeMedia()
- public mixed deleteLikedMedia()
- public mixed getLocation()
- public mixed getLocationMedia()
- public mixed searchLocation()
- public mixed pagination()
- public mixed getOAuthToken()
- protected mixed _makeCall()
- private mixed _makeOAuthCall()
- public void setAccessToken()
- public string getAccessToken()
- public void setApiKey()
- public string getApiKey()
- public void setApiSecret()
- public string getApiSecret()
- public void setApiCallback()
- public string getApiCallback()
Constants
Name | Value |
---|---|
API_URL | 'https://api.instagram.com/v1/' |
API_OAUTH_URL | 'https://api.instagram.com/oauth/authorize' |
API_OAUTH_TOKEN_URL | 'https://api.instagram.com/oauth/access_token' |
Members
private
- $_accesstoken
—
string
The user access token - $_actions
—
array
Available actions - $_apikey
—
string
The Instagram API Key - $_apisecret
—
string
The Instagram OAuth API secret - $_callbackurl
—
string
The callback URL - $_scopes
—
array
Available scopes
Methods
private
- _makeOAuthCall() — The OAuth call operator
protected
- _makeCall() — The call operator
public
- __construct() — Default constructor
- addMediaComment() — Add a comment on a media
- deleteLikedMedia() — Remove user like on a media
- deleteMediaComment() — Remove user comment on a media
- getAccessToken() — Access Token Getter
- getApiCallback() — API Callback URL Getter
- getApiKey() — API Key Getter
- getApiSecret() — API Secret Getter
- getLocation() — Get information about a location
- getLocationMedia() — Get recent media from a given location
- getLoginUrl() — Generates the OAuth login URL
- getMedia() — Get media by its id
- getMediaComments() — Get a list of comments for this media
- getMediaLikes() — Get a list of users who have liked this media
- getOAuthToken() — Get the OAuth data of a user by the returned callback code
- getPopularMedia() — Get the most popular media
- getTag() — Get info about a tag
- getTagMedia() — Get a recently tagged media
- getUser() — Get user info
- getUserFeed() — Get user activity feed
- getUserFollower() — Get the list of users this user is followed by
- getUserFollows() — Get the list of users this user follows
- getUserLikes() — Get the liked photos of a user
- getUserMedia() — Get user recent media
- getUserRelationship() — Get information about a relationship to another user
- likeMedia() — Set user like on a media
- modifyRelationship() — Modify the relationship between the current user and the target user
- pagination() — Pagination feature
- searchLocation() — Get recent media from a given location
- searchMedia() — Search media by its location
- searchTags() — Search for tags by name
- searchUser() — Search for a user
- setAccessToken() — Access Token Setter
- setApiCallback() — API Callback URL Setter
- setApiKey() — API-key Setter
- setApiSecret() — API Secret Setter