Forum QuickConnect FacebookOAuthConnect Not Responding

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

FacebookOAuthConnect Not Responding

Postby blitzen » February 6th, 2014, 10:42 pm

I'm in the Unity 4.3.2f1 web player, retrieving the user's facebook access_token (externally from the Facebook JavaScript API) and then attempting to pass it to FacebookOAuthConnect; however, the call finishes with no response, and neither the success nor error callback is run, as if the entire call is a NOOP:

Code: Select all
string gameID="<My Game ID>",accessToken="<Retrieved externally";
PlayerIOClient.PlayerIO.QuickConnect.FacebookOAuthConnect(gameID,accessToken,null,
   (Client client)=>{//Not run.
      SysMessage("Logged in through Facebook.");
      //Do stuff to initialize client
   },
   (PlayerIOError e)=>{//Not run either.
      SysMessage("Error logging into Facebook: "+e.ToString());
   }
);
//Code reaches here, so the call was executed.


In my Player.IO QuickConnect admin panel, I checked "Enable QuickConnect for Facebook", filled in the App ID and App Secret from my app on Facebook, left "Connection" as "Public" and set the "Go To App URL" to that of my game (even though it says it's only needed for the Facebook Connect Popup Method, which mine is not).

On the Facebook side, I have it only as a website application (not canvas), and by the way, when I set the Site URL directly to my website, the Facebook SDK on the client is able to log in and retrieve the access token. But the Player.IO admin panel says to set it to "http://<Game ID>.fb.playerio.com/fb/" and when I do that, FB.login fails saying the login needs to come from the same domain as the Site URL.

EDIT:

In running it in the editor with a manually-copied access token, I now see that it's the same issue I brought up in my previous post about SimpleGetCaptcha:

System.NullReferenceException: Object reference not set to an instance of an object
at UnityEngine.WWW.CheckSecurityOnHeaders (System.String[] headers) [0x0010b] in C:\BuildAgent\work\d3d49558e4d408f4\Runtime\Export\WWW.cs:56
at UnityEngine.WWW..ctor (System.String url, System.Byte[] postData, System.Collections.Hashtable headers) [0x00018] in C:\BuildAgent\work\d3d49558e4d408f4\artifacts\EditorGenerated\Utils.cs:72
at PlayerIOClient.Internal.identifier5+identifier414.getRequest[identifier82] (Int32 method, identifier576 args) [0x00000] in <filename unknown>:0
UnityEngine.Debug:LogError(Object)
PlayerIOClient.Internal.identifier414:getRequest(Int32, identifier576)
PlayerIOClient.Internal.identifier415:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
PlayerIOClient.Internal.identifier414:Call(Int32, identifier82, Callback`1, Callback`1)
PlayerIOClient.Internal.identifier5:FacebookOAuthConnect(String, String, String, Callback`1, Callback`1)
PlayerIOClient.Internal.identifier519:FacebookOAuthConnect(String, String, String, Callback`1, Callback`1)
<FacebookCallback>c__Iterator5:MoveNext() (at Assets/scripts/ClientManager.cs:950)



Still not sure whether Unity Technologies is going to fix their CheckSecurityOnHeaders method or if PlayerIO is supposed to fix the headers that are returned, but it's still hampering all our progress in making Unity games on Player.IO.
blitzen
 
Posts: 12
Joined: February 6th, 2013, 4:48 am

Return to QuickConnect



cron