Broarm\Instagram\InstagramClient
Class InstagramClient
Synopsis
class InstagramClient
{
- // constants
- const API_URL = 'https://graph.instagram.com/';
- // members
- private static $app_id = NULL;
- private static $app_secret = NULL;
- private static array $scope = ;
- private static array $user_fields = ;
- private static string $response_type = 'code';
- protected Client $client;
- // methods
- public void __construct()
- public ResponseInterface getLongLivedAccessToken()
- public ResponseInterface getRefreshLongLivedAcctionToken()
- public ResponseInterface getUser()
- public ResponseInterface getUserMedia()
- public void getMedia()
- public static string getAppID()
- public static string getAppSecret()
- public static string getAuthenticationURL()
- public static DataList getAuthenticatedMembers()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Constants
Name | Value |
---|---|
API_URL | 'https://graph.instagram.com/' |
Members
private
- $app_id
- $app_secret
- $response_type
- $scope
- $user_fields
protected
- $client — GuzzleHttp\Client
Methods
public
- __construct() — Construct a client for a given access token Access tokens are stored on members, so multiple accounts van be added to your site.
- getAppID() — Get the app id form the config or database
- getAppSecret() — Get the app secret form the config or database
- getAuthenticatedMembers() — Get a list of authenticated members
- getAuthenticationURL() — Create the url for authenicating users
- getLongLivedAccessToken() — Exchange the short lived access token for a long lived access token
- getMedia()
- getRefreshLongLivedAcctionToken() — Refresh the in use access token
- getUser() — Get the user info for the user connected to the token or given id
- getUserMedia() — Get the media for the current user or given user id