Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
RhysLees committed Jan 29, 2025
1 parent 73aa600 commit 993622c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Actions/InstagramHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function connector(): InstagramConnector
if ($authenticator->hasExpired()) {
$authenticator = $connector->refreshAccessToken($authenticator);

Cache::store(config('instagram.cache_store'))->put('instagram.authenticator', $serialized, now()->addDays(60));
Cache::store(config('instagram.cache_store'))->put('instagram.authenticator', $authenticator->serialize(), now()->addDays(60));
}

$connector->authenticate($authenticator);
Expand Down
2 changes: 1 addition & 1 deletion src/Data/InstagramUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
public string $username,
public string $name,
public string $account_type,
public string $profile_picture_url,
public ?string $profile_picture_url,
public int $followers_count,
public int $follows_count,
public int $media_count,
Expand Down
2 changes: 0 additions & 2 deletions src/Http/Controllers/InstagramController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public function callback(Request $request)

$json = $response->json();

ray($json);

Cache::store(config('instagram.cache_store'))->put('instagram.authenticated', $json, now()->addDays(60));

return response('Authenticated Instagram account: '.Arr::get($json, 'username'), 200);
Expand Down

0 comments on commit 993622c

Please sign in to comment.