Facebook plugin comments - text is lost after logging in

When I add a comment to the Facebook comment plugin to log out, the Log In button appears.

enter image description here

I click it and log in, the webview reboots in the login state and the text is lost.

enter image description here

How can this be fixed?

+5
source share
2 answers

Since you have no code. I can only remind you that String and Array are "pass by value"

0
source

What you can do for a quick and easy fix is ​​to use NSUserDefaults to save when you click "Enter message" and then reload this line when the user is logged in.

The reason that the text is lost, I assume here that there is no function to cache or save this line, and it just reloads the source code with a user token, but not the text that was printed before.

So, in conclusion, try to save the line when you click this button. Then reload the text and programmatically change the value of the input text. Does this make sense? I often get confused when I try to explain things.

0
source

Source: https://habr.com/ru/post/1243766/


All Articles