question

Spencer avatar image
Spencer asked

GetFriendsList has been broken in Unreal since 5.1 released.

Every combination of inputs for this request through blueprints returns an error. It has been this way for months. Worked before upgrading to 5.1 Request:

LogPlayFab: Request: { "ExternalPlatformFriends": "All", "IncludeFacebookFriends": false, "IncludeSteamFriends": false, "XboxToken": null }

Response:

LogPlayFab: Response : {"code":400,"status":"BadRequest","error":"InvalidParams","errorCode":1000,"errorMessage":"Invalid input parameters","errorDetails":{"":["Only one of the following properties can be defined: IncludeFacebookFriends, ExternalPlatformFriends","Only one of the following properties can be defined: IncludeSteamFriends, ExternalPlatformFriends"]}}

5534-image.png

unreal
image.png (67.6 KiB)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Xiao Zha avatar image Xiao Zha commented ·

I will do some research.

0 Likes 0 ·

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

We have reported this issue to the team. As a workaround, you can modify the code from line 6100 to line 6109 in Marketplace\PlayFabSDK\Source\PlayFab\Private\PlayFabClientAPI.cpp to the following code and rebuild the plugin:

 if (GetEnumValueToString<EExternalFriendSources> (TEXT("EExternalFriendSources"), request.ExternalPlatformFriends, temp_ExternalPlatformFriends))
     {
         if(temp_ExternalPlatformFriends!="None")
         OutRestJsonObj->SetStringField(TEXT("ExternalPlatformFriends"), temp_ExternalPlatformFriends);
     }
            
     if(request.IncludeFacebookFriends)
     OutRestJsonObj->SetBoolField(TEXT("IncludeFacebookFriends"), request.IncludeFacebookFriends);
     if(request.IncludeSteamFriends)
     OutRestJsonObj->SetBoolField(TEXT("IncludeSteamFriends"), request.IncludeSteamFriends);
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chuck avatar image Chuck commented ·

Note that the code above is missing a ">".

It should be

C++
if (GetEnumValueToString(TEXT("EExternalFriendSources"), request.ExternalPlatformFriends, temp_ExternalPlatformFriends))
     {
         if(temp_ExternalPlatformFriends!="None")
         OutRestJsonObj->SetStringField(TEXT("ExternalPlatformFriends"), temp_ExternalPlatformFriends);
     }
            
     if(request.IncludeFacebookFriends)
     OutRestJsonObj->SetBoolField(TEXT("IncludeFacebookFriends"), request.IncludeFacebookFriends);
     if(request.IncludeSteamFriends)
     OutRestJsonObj->SetBoolField(TEXT("IncludeSteamFriends"), request.IncludeSteamFriends);
0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Chuck commented ·

Thank you for pointing out the problem, I have revised it.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.