GitShow/facebook/facebook-sdk-for-unity
facebook

facebook-sdk-for-unity

The facebook sdk for unity.

by facebook
Star on GitHubForkWebsite

C++

506 stars267 forks44 contributorsActive · 9h agoSince 2015sdk-version-18.1.0

Meet the team

See all 44 on GitHub →
JordiFB
JordiFB104 contributions
KylinChang
KylinChang92 contributions
JarWarren
JarWarren20 contributions
swiese
swiese19 contributions
SergioGuerreroFB
SergioGuerreroFB16 contributions
ryantobinmeta
ryantobinmeta15 contributions
kthai
kthai10 contributions
jjiang10
jjiang109 contributions

Languages

View on GitHub →
C++45.4%
C#43.8%
Java4.7%
Objective-C++2.1%
Shell1.7%
Objective-C0.7%
Other1.6%

Commit activity

Last 12 weeks · 18 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
87
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 9h ago
See all on GitHub →
igs-qilincai
[iOS] Native Login fails with "Cancel" because of missing SceneDelegate support in Unity 6OpenIssue

Checklist [x] I've updated to the latest released version of the SDK [x] I've searched for existing GitHub issues [x] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group [x] I've read the Code of Conduct [x] This issue is not security related and can safely be disclosed publicly on GitHub Environment Unity Editor Version: Unity SDK Version: Installation Platform & Version: (Targeting iOS 13+) Goals To successfully complete the Facebook Login process (App-to-App switch) on iOS when the user has authorized App Tracking Transparency (ATT). Expected Results When a user authorizes ATT, the SDK switches to the native Facebook iOS App for authentication. After the user grants permission and is redirected back to the Unity App via the URL scheme, the Facebook SDK should intercept the URL and return a success callback with a valid access token. Actual Results The Unity callback receives a state instead of success. Recently, Unity officially introduced native Apple lifecycle support (as detailed in this Unity official announcement). Due to this architectural change, in modern Unity iOS builds (like ), the app returns from the native Facebook App via () rather than the legacy . It appears the Facebook Unity SDK currently only injects/listens to the legacy () and completely misses the URL scheme callback when it is routed through the new lifecycle. Because the SDK fails to intercept the returning URL containing the auth token, it falsely assumes the user returned to the app without completing the login flow, thus incorrectly triggering the callback. (Note: If ATT is denied, the SDK falls back to the Limited Login webview which does not leave the app, and the login succeeds as expected. The bug specifically breaks the App-to-App switch flow under the new Unity UIScene architecture). Steps to Reproduce 1. Create a Unity project and build for iOS. 2. Import Facebook Unity SDK . 3. Implement a standard Facebook Login button. 4. On an iOS device (iOS 13+), prompt for ATT and choose Allow. 5. Tap the Facebook Login button. The app will switch to the native Facebook App. 6. Approve the login in the Facebook App. 7. The device switches back to the Unity App. 8. Observe the Unity callback: It returns a result. Code Samples & Details Workaround / Root Cause:* We noticed that in Unity 6, iOS URL schemes are handled by .(src) By manually forwarding the URL from to , the login succeeds. The SDK should ideally handle this injection automatically for Unity projects using . Here is the manual workaround we had to apply in our to fix the issue:

igs-qilincai · 1mo ago
MartinGonzalez
Facebook SDK in Unity Package ManagerOpenIssue

It would be nice to deliver facebook sdk through UPM. We all know the benefits of that. Is there any plan to do that?

MartinGonzalez · 1mo ago
devauk
Facebook Unity SDK v18 - Limited Login Warning Appears Even When ATT is EnabledOpenIssue

We are integrating Facebook Login in a Unity iOS game using Facebook Unity SDK v18.0. Our implementation uses ATT status to determine the login mode: ATT Authorized → LoginTracking.ENABLED ATT Denied/Restricted/Not Determined → LoginTracking.LIMITED Code: if (AuthorizationTrackingManager.Instance.IsAuthTrackingEnabled()) { FB.Mobile.LoginWithTrackingPreference( LoginTracking.ENABLED, permissions, GenerateNonce(), HandleLoginResult); } else { FB.Mobile.LoginWithTrackingPreference( LoginTracking.LIMITED, permissions, GenerateNonce(), HandleLimitedLoginResult); } When testing on iOS, the Facebook login screen displays the following message: "If you are not using Limited Login, you will need to handle all Graph API calls using Graph API, iOS. The access token will not be valid. Note : This message appears for users who are been added as testers or developers 1. Is this warning expected for all Limited Login flows in SDK v18? 2. Does the appearance of this warning indicate any misconfiguration in Facebook dashboard? 3. Is this a known issues with test users ? ```

devauk · 1mo ago
Structured data for AI agents

Repository: facebook/facebook-sdk-for-unity. Description: The facebook sdk for unity. Stars: 506, Forks: 267. Primary language: C++. Languages: C++ (45.4%), C# (43.8%), Java (4.7%), Objective-C++ (2.1%), Shell (1.7%). Homepage: https://developers.facebook.com/docs/unity Latest release: sdk-version-18.1.0 (1mo ago). Open PRs: 25, open issues: 420. Last activity: 9h ago. Community health: 87%. Top contributors: JordiFB, KylinChang, JarWarren, swiese, SergioGuerreroFB, ryantobinmeta, kthai, jjiang10, zenlita, owaisfb and others.

·@ofershap

Replace github.com with gitshow.dev