public function InstagramOAuth::__construct in Drupagram 7
Same name and namespace in other branches
- 6 drupagram.lib.php \InstagramOAuth::__construct()
Constructor for the InstagramOAuth class
Overrides Instagram::__construct
File
- ./
drupagram.lib.php, line 460 - Classes to implement the full Instagram API
Class
- InstagramOAuth
- A class to provide OAuth enabled access to the Instagram API
Code
public function __construct($client_id = NULL, $client_secret = NULL, $redirect_uri = NULL, $access_token = NULL) {
if (empty($client_id) || empty($client_secret)) {
throw new InstagramException(t('You need to configure your Client ID and/or Client Secret keys.'));
}
$this->client_id = $client_id;
$this->client_secret = $client_secret;
if (isset($redirect_uri)) {
$this->redirect_uri = $redirect_uri;
}
if (isset($access_token)) {
$this->access_token = $access_token;
}
}