# FindFriendSession Callback Fails

**URL:** <https://forums.unrealengine.com/t/findfriendsession-callback-fails/477073>\
**Category:** Platform & Builds\
**Tags:** Steam, online-session, unreal-engine, CPP, question\
**Created:** [January 11, 2021, 8:26am UTC](https://forums.unrealengine.com/t/findfriendsession-callback-fails/477073 "2021-01-11T08:26:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WackyWhisker\_C](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wackywhisker_c/32/1019504_2.png) [@WackyWhisker\_C](https://forums.unrealengine.com/u/WackyWhisker_C)\
**Post date:** [January 11, 2021, 8:26am UTC](https://forums.unrealengine.com/t/findfriendsession-callback-fails/477073/1 "2021-01-11T08:26:18Z")

</div>

Hello,

I am trying to use the FindFriendSession within the Steam online Subsystem.  
The implementation I am using is:

```
virtual bool FindFriendSession(const FUniqueNetId& LocalUserId, const TArray<TSharedRef<const FUniqueNetId>>& FriendList) = 0;

```

The way I am using it is:

```
SessionInterface->FindFriendSession(*PlayerId.ToSharedRef(), OnlineFriendIDs);

```

Whereas PlayerID is a `FUniqueNetId` and OnlineFriendIDs a `TArray<TSharedRef<const FUniqueNetId>>`

The callback for this that I am using is:

```
void OnFindFriendSessionComplete(int32 LocalUserNum, bool Success, const TArray<FOnlineSessionSearchResult> & SearchResults);

```

Now when I am calling the method, the callback seems to be called correctly, but apparently it fails (success comes back as fault). If I put in `UE_LOG` into the call back into a `if (!Success) {}` branch, it writes it out as well.

The verbose console when launching the game(s) while testing with a steam friend spits out:

```
LogOnlineSession: Display: STEAM: FOnlineSessionSteam::FindFriendSession(const FUniqueNetId& LocalUserId, const TArray<TSharedRef<const FUniqueNetId>>& FriendList) - not implemented

```

What does not implemented mean?  
Am I using the wrong callback?  
Is that implementation of the FindFriendSession not supported anymore?

I am fairly confident that there is one existing session because when I use a FindFriendSession implementation where I pass in a singular friend ID, it finds it.

Chris

---

<div class="post-metadata">

**Author:** ![Jeff\_Allen96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jeff\_Allen96](https://forums.unrealengine.com/u/Jeff_Allen96)\
**Post date:** [March 15, 2022, 11:13am UTC](https://forums.unrealengine.com/t/findfriendsession-callback-fails/477073/2 "2022-03-15T11:13:21Z")

</div>

Hi Hermi,

I apologize I am giving an answer after 1 year of your post but I only recently started working on the steam sessions.

The reason why we get this LOG is because they haven’t implemented the function. I checked into the source code.

This is inside the function -

bool FOnlineSessionSteam::FindFriendSession(const FUniqueNetId& LocalUserId, const TArray\<TSharedRef\>& FriendList)  
{  
UE\_LOG\_ONLINE\_SESSION(Display, TEXT(“FOnlineSessionSteam::FindFriendSession(const FUniqueNetId& LocalUserId, const TArray\<TSharedRef\>& FriendList) - not implemented”));  
// @anonymous_user_5851a2121: use proper LocalUserId  
TArray EmptyResult;  
TriggerOnFindFriendSessionCompleteDelegates(0, false, EmptyResult);  
return false;  
}

---

<div class="post-metadata">

**Author:** ![Jeff\_Allen96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jeff\_Allen96](https://forums.unrealengine.com/u/Jeff_Allen96)\
**Post date:** [March 15, 2022, 11:16am UTC](https://forums.unrealengine.com/t/findfriendsession-callback-fails/477073/3 "2022-03-15T11:16:56Z")

</div>

Instead for a workaround. I’ve implemented another way to do this and it works.

//Find friends servers function, called when friends server list is opened or the refresh button in the menu is clicked  
void UMbRGameInstance::FindServersOfFriends()  
{  
UE\_LOG(LogTemp, Warning, TEXT(“Find Friends’ Server”));

```
sessionSearch = MakeShareable(new FOnlineSessionSearch());
sessionSearch->bIsLanQuery = (IOnlineSubsystem::Get()->GetSubsystemName() == "NULL") ? true : false;
sessionSearch->MaxSearchResults = 9999;
sessionSearch->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);

if (onlineFriendList.Num() != 0)
{
	for (TSharedRef<FOnlineFriend> onlineFriend : onlineFriendList)
	{
		sessionInterface->FindFriendSession(0, onlineFriend->GetUserId().Get());
	}
}

```

}
