x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

4.16 Facebook OSS not firing OnLoginFlowStarted

Hello, I had Facebook integration working in 4.15, but at 4.16 a lot changed, since Epic introduced an external UI interface for desktop implementations.

But there's no documentation on how to confiure it properly, so I tried following this thread: https://answers.unrealengine.com/questions/607617/how-to-configure-onlinesubsystem-loginflow.html

In resume, I changed the following:

  • Added LoginFlow module to my project Build.cs

  • Set OnlineFramework and OnlineSubsystemFacebook as enabled in my .uproject

  • Updated OnlineFramework.uplugin and LoginFlow.Build.cs as said by Machine.Widmo

After this configuration step, it seems we need to add some initialization code to provide the LoginFlowManager with a delegate for us to receive the slate widget. It wasn't clear where should this code go, so as suggested by Josh.Markiewicz I added it to my Player Controller. It was also not clear in which step of the initialization process of the Player Controller we should add that, so I added it to PostInitializeComponents, so it looks like this:

 void AFacebook416PlayerController::PostInitializeComponents()
 {
     Super::PostInitializeComponents();
 
     // Initialize the login flow UI code
     UWorld* World = GetWorld();
     if (World)
     {
         FName FacebookIdentifier = Online::GetUtils()->GetOnlineIdentifier(World, FACEBOOK_SUBSYSTEM);
   
         ILoginFlowModule& LoginFlowModule = ILoginFlowModule::Get();
         LoginFlowManager = LoginFlowModule.CreateLoginFlowManager();
         if (!LoginFlowManager->AddLoginFlow(FacebookIdentifier, ILoginFlowManager::FOnDisplayPopup::CreateUObject(this, &AFacebook416PlayerController::OnDisplayLoginWidget)))
         {
             UE_LOG(LogTemp, Warning, TEXT("No Facebook subsystem configured. It will be unavailable"));
         }
     }
 }

This code seems to be working fine, since AddLoginFlow is returning true. So now when I call IdentityInterface->Login I expect OnDisplayLoginWidget to be called with the login UI slate widget. The problem is that it is never called.

I head to try figuring out why was that, debugging and tracing the login from the Login implementation. This is the result:

  • OnlineSubsystemFacebook\Source\Private\Windows\OnlineIdentityFacebook

Login is implemented here. Since no ID nor token was provided, OnlineExternalUI->ShowLoginUI is called.

  • OnlineSubsystemFacebook\Source\Private\Windows\OnlineExternalUIInterfaceFacebook

ShowLoginUI called here, everything is fine so TriggerOnLoginFlowUIRequiredDelegates is called. This delegate should fire a method binded in AddLoginFlow. This is how this delegate is setup in AddLoginFlow:

 OnlineExternalUI->AddOnLoginFlowUIRequiredDelegate_Handle(FOnLoginFlowUIRequiredDelegate::CreateSP(this, &FLoginFlowManager::OnLoginFlowStarted, OnlineIdentifier));

So after triggering the OnLoginFlowUIRequired delegate, we expect OnLoginFlowStarted to be called, but it never does.

I'm clueless on why OnLoginFlowStarted is not called, since we correctly called AddLoginFlow, which binded the OnLoginFlowUIRequired delegate to call it, caching our provided delegate to receive the slate widget.

Am I missing some configuration?

Product Version: UE 4.16
Tags:
more ▼

asked Jun 26 '17 at 07:28 PM in C++ Programming

avatar image

MatheusRC
6 2 7 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello,

We can help you. Our plugin Extended Facebook Online Subsystem is exactly what you need: https://forums.unrealengine.com/unreal-engine/marketplace/85702-holiday-sale-40-extended-facebook-online-subsystem Plugin was released 2 years ago and was tested in many ways during this time. It's stable, receives update every 1-2 months ,and we provide premium support.

If you have any questions, feel free to ask! :)

Patrick, gameDNA Ltd

more ▼

answered Dec 24 '17 at 04:15 PM

avatar image

gameDNA studio
121 8 15 23

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question