Hey. I want to make the game created on the unity engine check if the player is following me on the website patreon.com (does this person support me financially). If yes - open the player access to the closed part of the game. If not, offer to support me financially on the site patreon.
On the website patreon, I created a hidden text post, accessible only to those who support me in monthly payments.
When you click on the button in the game, the Request is triggered.
using System.Collections; using UnityEngine; public class API : MonoBehaviour { private const string URL = "www.patreon.com"/*+ адрес поста доступного только подписчикам на patreon*/; public string responseText; public void Request() { WWW request = new WWW(URL); StartCoroutine(OnResponse(request)); } private IEnumerator OnResponse(WWW req) { yield return req; if (string.IsNullOrEmpty(req.error)) { Debug.Log(responseText); } else { print("Error Downloading: " + req.error); } } } When doing this all in the responseText variable, I get the page code with the post. And everything would be perfect ... I would just have to find the coincidence of a part of the code with the text of a real post using IndexOf. If there is no match, IndexOf will return -1 and the player will be asked to support me financially, or another number, and this will mean that the text is the same and the player can access the next part of the game.
The fact is that I get the code of the page of an unregistered user (even if I currently have a browser on my computer and I am logged in to my account on patreon). Those. I get an unregistered user page and the desired post is not visible even from users who support me financially and have access to this post through a browser.
The essence of the question is whether it is possible in unity (if yes, how) to allow the user to enter the account data of a site (in this case patreon) and use this data for authorization on a real site. (With the goal - to verify a specific page (an authorized person) with the text of a secret post - a key to activate the continuation of the game)
I am new to programming and if you have a solution, I would like to see a detailed description, but in any case ...
... I will be glad to any answers.