Forum QuickConnect Facebook SDK

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

Facebook SDK

Postby Mario Fischel » October 17th, 2011, 6:06 am

Hi everyone, I want to ask a question about Facebook AS3 SDK of PlayerIO but I don't know where to put this question properly! Each time I try to call FB.UI it throws an error that I should include the official Facebook Javascript SDK to call ui function. But I've already included all.js in my index.html and I don't know why there's still that error!!! Can anyone help me I appreciate so much! Thanks a lot.

Here's my code:

Code: Select all
var accessToken:String = paramList["access_token"];
FB.init({ access_token:accessToken });


Then I call FB.UI elsewhere:

Code: Select all
var data:Object = new Object();
data.message = "Hey this game is very interesting!";
data.method = "apprequests";
data.display = "iframe";
FB.ui(data, function(obj:Object):void{});


In my index.html I've already had:

Code: Select all
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>


Am I wrong somewhere?
Mario Fischel
 
Posts: 10
Joined: October 13th, 2011, 9:57 am

Re: Facebook SDK

Postby Oliver » October 17th, 2011, 12:29 pm

Could it be something with security and the embed tag? That is, that the flash element on the page is not being allowed to talk out to the containing page?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Facebook SDK

Postby Mario Fischel » October 18th, 2011, 7:08 am

Thanks for your reply, I've figured out what the problem was! Actually it's because I didn't init the FB javascript SDK. And for those of you who also have this problem, just put the FB.init statement anywhere but after the fb-root tag and you will be able to connect to the ui. :lol:
Mario Fischel
 
Posts: 10
Joined: October 13th, 2011, 9:57 am


Return to QuickConnect



cron