\InstagramAccount
Synopsis
class InstagramAccount
extends DataObject
{
- // members
- private static $client_id;
- private static $client_secret;
- private static $redirect_path;
- private static integer $items_per_page = 9;
- private static array $db = ;
- // methods
- public FieldList getCMSFields()
- public FieldList getCMSActions()
- public RequiredFields getCMSValidator()
- public void updateAccessToken()
- public static Instagram getNewInstagramClient()
- public string|null getOAuthStateValueFromLoginURL()
- public string|null getSessionOAuthState()
- public string|null getInstagramID()
- public boolean isValidMediaID()
- private void setSessionOAuthState()
- public Response|null getMedia()
Hierarchy
Extends
- DataObject
Members
private
- $client_id — string
- $client_secret — string
- $db — array
- $items_per_page
- $redirect_path — string
Methods
private
- setSessionOAuthState() — Sets a Session variable which is used to keep track of the InstagramAccount through the OAuth flow.
public
- getCMSActions()
- getCMSFields()
- getCMSValidator()
- getInstagramID() — Gets the authorised user's Instagram ID from the AccessToken.
- getMedia() — Gets a list of media from the user's Instagram.
- getNewInstagramClient() — Create a configured Instagram API interface.
- getOAuthStateValueFromLoginURL() — Gets the 'state' value from an OAuth login URL.
- getSessionOAuthState() — Gets the InstsgramAccount's OAuth state from Session.
- isValidMediaID() — Checks if the passed ID is a valid pattern.
- updateAccessToken() — Ensures the person to authorising the account is logged into Instagram as the correct user before setting the token.