Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

        }
like image 577
Ivo Stoyanov Avatar asked Dec 22 '16 09:12

Ivo Stoyanov


2 Answers

You should import FacebookCore:

import FacebookCore
like image 130
Ivo Stoyanov Avatar answered Nov 11 '22 00:11

Ivo Stoyanov


import FBSDKCoreKit
import FBSDKLoginKit
like image 3
Maxim Golovlev Avatar answered Nov 11 '22 01:11

Maxim Golovlev