Forum QuickConnect facebookOAuthConnectPopup: An error occured...

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

facebookOAuthConnectPopup: An error occured...

Postby yohami » March 12th, 2013, 4:58 am

Hi guys,

Downloaded the last SDK, configured the facebook app and sitebox and got the seedlings working fine. Still when I try to facebookOAuthConnectPopup from the IDE, or even when putting the swf on the web, Im getting the " An error occured, please try again" from facebook.

Here's the code. Im using flash CS6 - exporting for player 11.2

Code: Select all
package
{   
   import flash.display.Sprite;
   import playerio.Client;
   import playerio.PlayerIO;
   import playerio.PlayerIOError;

   public class TestFB extends Sprite
   {
      public function TestFB()
      {
         var gameid:String = "..." // YOUR GAME ID HERE
         
         PlayerIO.quickConnect.facebookOAuthConnectPopup(
            stage,
            gameid,
            "_blank",
            [],
            "",
            function(c:Client, token:String, userid:String):void{
              trace("now connected",c,token,userid)
            }, function(e:PlayerIOError):void{}
         )
      }
   }
}


I did a few projects with playerio and facebook about a year ago and it worked flawlessly. Did something change, or did I forget to configure something?
yohami
 
Posts: 22
Joined: February 28th, 2011, 12:03 pm

Re: facebookOAuthConnectPopup: An error occured...

Postby Benjaminsen » March 12th, 2013, 4:06 pm

Are you running the debug player, and if so are you receiving any flash errors?
If not, reboot, the error is related to to a localConnection bug in flash, where transport channels can break over time.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: facebookOAuthConnectPopup: An error occured...

Postby yohami » March 12th, 2013, 4:11 pm

aight, rebooting
yohami
 
Posts: 22
Joined: February 28th, 2011, 12:03 pm

Re: facebookOAuthConnectPopup: An error occured...

Postby yohami » March 12th, 2013, 7:01 pm

rebooted and ran it in debug mode, got the "error occured" on the pop up, and this on the flash trace:

Code: Select all
Warning: Ignoring 'secure' attribute in policy file from http://api.playerio.com/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.

Warning: Ignoring 'secure' attribute in policy file from http://api.playerio.com/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.

Warning: Domain api.playerio.com does not specify a meta-policy.  Applying default meta-policy 'master-only'.  This configuration is deprecated.  See http://www.adobe.com/go/strict_policy_files to fix this problem.


The regular quick connect works btw, it's just the facebookauth what's not working
yohami
 
Posts: 22
Joined: February 28th, 2011, 12:03 pm

Re: facebookOAuthConnectPopup: An error occured...

Postby yohami » March 12th, 2013, 7:03 pm

BTW I went to the sitebox config and disabled all the permissions, so it doesnt request anything (email, friends, etc, nothing), to discard facebook rejecting the connection due to those, but same result
yohami
 
Posts: 22
Joined: February 28th, 2011, 12:03 pm

Re: facebookOAuthConnectPopup: An error occured...

Postby Benjaminsen » March 12th, 2013, 7:05 pm

yohami wrote:rebooted and ran it in debug mode, got the "error occured" on the pop up, and this on the flash trace:

Code: Select all
Warning: Ignoring 'secure' attribute in policy file from http://api.playerio.com/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.

Warning: Ignoring 'secure' attribute in policy file from http://api.playerio.com/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.

Warning: Domain api.playerio.com does not specify a meta-policy.  Applying default meta-policy 'master-only'.  This configuration is deprecated.  See http://www.adobe.com/go/strict_policy_files to fix this problem.


The regular quick connect works btw, it's just the facebookauth what's not working


You can ignore the warnings. I tested and everything worked perfectly.

Code: Select all
package
{   
   import flash.display.Sprite;
   import playerio.Client;
   import playerio.PlayerIO;
   import playerio.PlayerIOError;

   public class test extends Sprite
   {
      public function test()
      {
         var gameid:String = "everybody-edits-su9rn58o40itdbnw69plyw" // YOUR GAME ID HERE
         
         PlayerIO.quickConnect.facebookOAuthConnectPopup(
            stage,
            gameid,
            "_blank",
            [],
            "",
            function(c:Client, token:String, userid:String):void{
              trace("now connected",c,token,userid)
            }, function(e:PlayerIOError):void{}
         )
      }
   }
}


In any case, you should not ever use FacebookOAuthConnectPopup, as due to the terms and conditions of Facebook. You can't basically use it anywhere without breaking the T&C. E.g. you cannot use it if you expect to have a Facebook app as well. Nor are you allowed to use it to load friends etc.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: facebookOAuthConnectPopup: An error occured...

Postby yohami » March 12th, 2013, 7:28 pm

Benjaminsen,

It works with your gameid, strange. Throws the same error with mine. Is there anything else I need to configure? I followed the sitebox guide and seedlings is running fine on my fb app, but this is smelling like a config problem now.

This is for a fb app, but I need to use the popup to be able to test locally. Debugging it online would take me forever.

Thanks
Yohami
yohami
 
Posts: 22
Joined: February 28th, 2011, 12:03 pm

Re: facebookOAuthConnectPopup: An error occured...

Postby yohami » March 12th, 2013, 8:04 pm

ok, problem solved by using mozilla instead of chrome.

The everybodyedits gameid didnt work, it gave the same error message as before after passing the permissions screen. So I installed mozilla and now it works, both for everyobdyedits and my own gameid.

Goggle... paging goggle. Fix your junk.

Thanks Ben.
yohami
 
Posts: 22
Joined: February 28th, 2011, 12:03 pm

Re: facebookOAuthConnectPopup: An error occured...

Postby Benjaminsen » March 13th, 2013, 10:54 am

yohami wrote:ok, problem solved by using mozilla instead of chrome.

The everybodyedits gameid didnt work, it gave the same error message as before after passing the permissions screen. So I installed mozilla and now it works, both for everyobdyedits and my own gameid.

Goggle... paging goggle. Fix your junk.

Thanks Ben.


Crap, guess I have to go have "fun" with pepper flash.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: facebookOAuthConnectPopup: An error occured...

Postby yohami » March 22nd, 2013, 2:55 am

Still works with mozilla every time, and fails with chrome every time, too :-)
yohami
 
Posts: 22
Joined: February 28th, 2011, 12:03 pm


Return to QuickConnect



cron