> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFAuthenticationLoginWithFacebookAsync

> Facebook 액세스 토큰을 사용하여 사용자를 로그인하고, 인증된 사용자가 필요한 API 호출에 이후 사용할 수 있는 세션 식별자를 반환합니다.

Facebook 액세스 토큰을 사용하여 사용자를 로그인하고, 인증된 사용자가 필요한 API 호출에 이후 사용할 수 있는 세션 식별자를 반환합니다.

## Syntax

```cpp theme={null}
HRESULT PFAuthenticationLoginWithFacebookAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const PFAuthenticationLoginWithFacebookRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigCreateHandle 호출에서 반환된 PFServiceConfigHandle입니다.

**`request`**   [PFAuthenticationLoginWithFacebookRequest\*](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithfacebookrequest)

값이 채워진 요청 객체입니다.

**`async`**   XAsyncBlock\*<br />*Inout*

비동기 작업을 위한 XAsyncBlock입니다.

### Return value

Type: HRESULT

이 API 작업의 결과 코드입니다.

## Remarks

이 API는 Android 및 iOS에서 사용할 수 있습니다. Facebook 로그인은 Facebook User Access Token을 사용하여 수행됩니다. 토큰에 대한 자세한 내용은 Facebook 개발자 설명서([https://developers.facebook.com/docs/facebook-login/access-tokens/](https://developers.facebook.com/docs/facebook-login/access-tokens/))에서 확인할 수 있습니다. 예를 들어, Unity에서 토큰은 Facebook SDK ScriptableObject FB의 AccessToken으로 사용할 수 있습니다. 사용자가 Facebook 계정으로 처음 로그인하고 CreateAccount가 true로 설정된 경우, 새 PlayFab 계정이 생성되고 제공된 계정의 Facebook ID에 연결됩니다. 이 경우, 이메일이나 사용자 이름이 PlayFab 계정과 연결되지 않습니다. 그렇지 않고 Facebook 계정에 연결된 PlayFab 계정이 없는 경우, 이를 나타내는 오류가 반환되어 타이틀이 사용자에게 PlayFab 계정 생성을 안내할 수 있습니다. Facebook은 애플리케이션별로 고유한 사용자 ID를 제공하므로 타이틀은 PlayFab Title ID 간에 동일한 Facebook 애플리케이션을 절대 재사용해서는 안 되며, 그렇게 하면 사용자의 PlayFab 계정 정보에서 Facebook ID와 관련된 문제가 발생할 수 있습니다. 새 PlayFab Title ID에서 애플리케이션을 반드시 재사용해야 하는 경우, 먼저 모든 계정을 Facebook에서 연결 해제하거나 첫 번째 Title ID의 모든 사용자를 삭제해야 합니다. 참고: 사용자가 AccessToken 대신 AuthenticationToken으로 인증된 경우, GetFriendsList API는 빈 목록을 반환합니다. ClientLinkFacebookAccountAsync, ClientUnlinkFacebookAccountAsync도 참조하세요. 비동기 작업이 완료되면 [PFAuthenticationLoginWithFacebookGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithfacebookgetresult)를 호출하여 결과를 가져오세요.

## Requirements

**Header:** PFAuthentication.h

## See also

[PFAuthentication members](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationLoginWithFacebookGetResult](/ko/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithfacebookgetresult.md)
- [PFAuthenticationLoginWithFacebookGetResultSize](/ko/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithfacebookgetresultsize.md)
- [Services C API 개요 - PFAuthentication.h](/ko/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationReLoginWithFacebookAsync](/ko/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithfacebookasync.md)
- [PFAuthenticationLoginWithFacebookRequest](/ko/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithfacebookrequest.md)
