Ivo Stoyanov
Ivo Stoyanov

Reputation: 18719

Use of unresolved identifier 'AccessToken' when using Facebook Swift SDK

I work with Facebook Swift SDK and I'm trying to check if the user is logged in. I get error message Use of unresolved identifier 'AccessToken'

My code is:

       if let accessToken = AccessToken.current {
            // User is logged in, use 'accessToken' here.

        }

Upvotes: 7

Views: 2708

Answers (2)

Maxim Golovlev
Maxim Golovlev

Reputation: 117

import FBSDKCoreKit
import FBSDKLoginKit

Upvotes: 3

Ivo Stoyanov
Ivo Stoyanov

Reputation: 18719

You should import FacebookCore:

import FacebookCore

Upvotes: 21

Related Questions