开发者

Facebook login within Flash without popup or redirect?

Does anybody know how to handle a Facebook l开发者_C百科ogin from within Flash using REST API/FB Connect, without the popup or redirect?

It doesnt seem very possible as the login method seems to force the popup.

Might it be possible by modding the code to have it load in an unseen iframe (i.e. navigateToURL(new URLRequest("http://www.facebook.com/connect/uiserver.php?app_id=....yadayadayada....&method=permissions.request"),"iframe");) and then sending an external interface call to javascript telling it to handle the subsequent DOM elements (login email and password fields and allow button) based on interactions in Flash? I'm open to creative suggestions... however crazy or complicated they may be.


use this to make a call to the FB REST-API

//Make a variables variable
var vars:URLVariables = new URLVariables;

//set information that is to be POSTed to fb
vars.user = username;
vars.pass = pass;

//connect to facebook api
var Request:URLRequest = new URLRequest ("fbapiurlhere");
Request.method = URLRequestMethod.POST;

//add variables
Request.data = vars;

//create a URL loader
var loader:URLLoader = new URLLoader (Request);

//specify what the returned data is
loader.dataFormat = URLLoaderDataFormat.TEXT;

//send it off
loader.load(Request);


It is not possible to do login without a popup or redirect. If you're using the JS SDK you can do a background ping using FB.getLoginStatus() which will return the user session if they have already authorized your application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜