예제 #1
0
    // Abre a tela para vinculo do Facebook ao usuario logado
    public bool link(GameBaseConnection <IJSonObject> .ConnectionAnswer callback = null)
    {
        if (callback != null)
        {
            this.callback = callback;
        }

        // Chama a pagina do Facebook no nosso servidor
        string fb_link_url = Flow.URL_BASE + "login/facebook/fblink.php";

        fb_link_url += "?token=" + WWW.EscapeURL(Save.GetString(PlayerPrefsKeys.TOKEN.ToString()));
        fb_link_url += "&device=" + SystemInfo.deviceUniqueIdentifier.Replace("-", "");

        if (!Flow.game_native.openUrlInline(fb_link_url))
        {
            return(false);
        }

        // Obtem a resposta do servidor
        Flow.config.GetComponent <ConfigManager>().StartCoroutine(handleLink());
        return(true);
    }
예제 #2
0
 public GameFacebook(GameBaseConnection <IJSonObject> .ConnectionAnswer callback = null)
 {
     this.callback = callback;
 }
예제 #3
0
	public GameFacebook(GameBaseConnection<IJSonObject>.ConnectionAnswer callback=null)
	{
		this.callback = callback;
	}
예제 #4
0
	// Abre a tela para vinculo do Facebook ao usuario logado
	public bool link(GameBaseConnection<IJSonObject>.ConnectionAnswer callback=null)
	{
		if (callback != null) this.callback = callback;
		
		// Chama a pagina do Facebook no nosso servidor
		string fb_link_url = Flow.URL_BASE + "login/facebook/fblink.php";
		fb_link_url += "?token=" + WWW.EscapeURL(Save.GetString(PlayerPrefsKeys.TOKEN.ToString()));
		fb_link_url += "&device=" + SystemInfo.deviceUniqueIdentifier.Replace("-", "");
		
		if (!Flow.game_native.openUrlInline(fb_link_url)) return false;
		
		// Obtem a resposta do servidor
		Flow.config.GetComponent<ConfigManager>().StartCoroutine(handleLink());
		return true;
	}