简体   繁体   中英

Facebook AccessToken returns nil

I can no longer sign-in-with-Facebook inside my app as AcessToken return nil...

Here is my function :

let accessToken = AccessToken.current

    guard let accessTokenString = accessToken?.tokenString else {
        print("bruh")
        return
    }

It currently prints the "bruh".

It was working the other days!

I didn't change anything inside that file. But I changed the Project Name and the Bundle Identifier . Could this have anything to do with the error?

UPDATE: I deleted the old Facebook-Project and created a new one with the correct Bundle-ID . I also changed the ID and Secret Token inside Firebase.

Is there anything else I need to do??? really annoying ... Is there maybe a way to show an error to see what the actual problem is?

It seems to be about changing of Bundle Identifier ,

You should set the new one on https://developers.facebook.com/

在此处输入图片说明

I fixed the issue! The problem was that I had the old ID inside my info.plist

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM