Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Fix hasAccessToken check #853

Merged
merged 1 commit into from
Mar 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/android/ConnectPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,12 @@ private ShareLinkContent buildContent(Map<String, String> paramBundle) {

// Simple active session check
private boolean hasAccessToken() {
return AccessToken.getCurrentAccessToken() != null;
AccessToken token = AccessToken.getCurrentAccessToken();

if (token == null)
return false;

return !token.isExpired();
}

private void handleError(FacebookException exception, CallbackContext context) {
Expand Down