Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by b45h05h4 · May 31, 2017 at 12:40 PM · facebookmobile devicesauthentication

firebase - Facebook authentication invalid access_token error code 43

Hello there,

I am trying to use Facebook Authentication for Firebase and I reached the stage where an exception is thrown (most of the time) in the android device saying,

SignInWithCredentialAsync encountered an error: System.aggregateexception: ... Firebase.FirebaseException: An internal error has occurred. [ invalid access_token error code 43 ]

Like in the image! attached I found no similar problem, and I don't know where can I use the error code 43 to reach an answer

Specially it worked ONCE!!, without changing anything .. I don't know what should I do?

  Firebase.Auth.Credential credential =
     Firebase.Auth.FacebookAuthProvider.GetCredential(token.TokenString);
         auth.SignInWithCredentialAsync(credential).ContinueWith(task => {
             if (task.IsCanceled)
             {
                 playerAppManager.DebugData("SignInWithCredentialAsync was canceled.");
                 return;
             }
             if (task.IsFaulted)
             {
                 playerAppManager.DebugData  ("SignInWithCredentialAsync encountered an error: " + task.Exception.ToString());
                 return;
             }
 
             Firebase.Auth.FirebaseUser newUser = task.Result;
             Debug.LogFormat("User signed in successfully: {0} ({1})",
                 newUser.DisplayName, newUser.UserId);
 
             playerAppManager.DebugData(newUser.DisplayName +" -- "+ newUser.UserId);
         });
 

alt text

screenshot-20170531-140533.png (115.2 kB)
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Paulk33 · Aug 15, 2017 at 02:16 PM 0
Share

i have the same problem with the unity facebook sdk. it tells me i have an invalid access token when i try to access the facebook api.let me know if you find a solution

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Paulk33 · Aug 15, 2017 at 07:23 PM

hi. i was getting the same error with the facebook sdk. This may help you....

so i have this function init'ing my scripts and the facebook api: void Awake() {

         FB.Init(OnFacebookInitialized);
 
         if (!FB.IsInitialized)
         {
             // Initialize the Facebook SDK
             FB.Init(InitCallback, OnHideUnity);
         }
         else
         {
             // Already initialized, signal an app activation App Event
             FB.ActivateApp();
         }
     }

which in turn then calls this:

 private void OnFacebookInitialized()
     {
         Debug.Log("Logging into Facebook...");
 
         // Once Facebook SDK is initialized, if we are logged in, we log out to demonstrate the entire authentication cycle.
         if (FB.IsLoggedIn)
             FB.LogOut();
 
         List<string> permissions = new List<string> { "public_profile", "user_friends", "email" };
 
         // We invoke basic login procedure and pass in the callback to process the result
         FB.LogInWithReadPermissions(permissions, authCallBack);
     }

what my issue was my user was always logged in, thus my token expired. idk if this helps but i have been stuck on an invalid access token error for a while and tried to reference your code to see if could help. hope this helps!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

104 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

firebase authentication with facebook 1 Answer

error CS0246: The type or namespace name `FBResult' could not be found 2 Answers

Facebook SDK - iOS - Doesn't return user data 1 Answer

How to do Firebase Facebook Authentication? 1 Answer

how can i use facebook authentication for pc games? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges