facebook / facebook/facebook-ios-sdk
Đăng nhập Facebook không hoạt động với IOS
- Dominant language
- Swift
- Stars
- 8.1k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist before submitting a bug report
- [X] I've updated to the latest released version of the SDK
- [X] I've searched for existing [GitHub issues](https://github.com/facebook/facebook-ios-sdk/issues)
- [X] I've looked for existing answers on [Stack Overflow](https://facebook.stackoverflow.com), the [Facebook Developer Community Forum](https://developers.facebook.com/community/) and the [Facebook Developers Group](https://www.facebook.com/groups/fbdevelopers)
- [X] I've read the [Code of Conduct](https://github.com/facebook/facebook-ios-sdk/blob/main/CODE_OF_CONDUCT.md)
- [X] This issue is not security related and can safely be disclosed publicly on GitHub
### Xcode version
15.4
### Facebook iOS SDK version
17.1.0
### Dependency Manager
SPM
### SDK Framework
Login
### Goals
Authenticated login with Facebook app on iPhone and returns success
### Expected results
The JWT containing AuthenticationToken.current?.tokenString after login must have a properly formatted title, body, and signature.
### Actual results
Always open login form

### Steps to reproduce
Set Up Facebook App and Run Sample Code
### Code samples & details
```swift
// INSERT YOUR CODE HERE
func getFBToken() {
let nonce = UUID().uuidString
let loginManager = LoginManager()
// Ensure the configuration object is valid
guard let configuration = LoginConfiguration(
permissions:["public_profile"],
tracking: .limited,
nonce: nonce
) else {
return
}
loginManager.logIn(configuration: configuration) { result in
switch result {
case .failed(let error):
print("loginFaceBook failed: ")
case .cancelled:
print("loginFaceBook cancelled: ")
case .success(let grantedPermissions, let declinedPermissions, let token):
print("loginFaceBook success: ")
// getting id token string
let tokenString = AuthenticationToken.current?.tokenString
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.