kennylerma / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

Get Facebook UID's User without any connection or click. Just thanks to the actionscript #277

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I would like know if you know if I can get the UID Facebook (just the UID 
Facebook) just with action script and without any javascript?

Best regards,

Maxime

Original issue reported on code.google.com by maximus...@gmail.com on 23 Mar 2011 at 4:06

GoogleCodeExporter commented 9 years ago
You can't get a user's info without a connection. But you can get their info by 
doing this:

import com.facebook.graph.Facebook;

Facebook.init(applicationId, handleInit);

function handleInit(response:Object, fail:Object):void {
   if (response) {
      // User is logged in.
      Facebook.api(USER_ID, handleUserInfo);
   } else if (fail) {
      // User hasn't logged in.
      Facebook.login(hanleLogin, options);
   }
}

function handleLogin(response:Object, fail:Object):void {
   if (response) {
      // User is logged in.
      Facebook.api(USER_ID, handleUserInfo);
   } else if (fail) {
      // User failed to log in.
   }
}

function handleUserInfo(response:Object, fail:Object):void {
   if (response) {
      // User info received.
      // Look here for additional props of response: http://developers.facebook.com/docs/reference/api/
      trace(response.name);
   }
}

Original comment by rovertn...@gmail.com on 31 Mar 2011 at 3:15

GoogleCodeExporter commented 9 years ago
Ok thanks !

And do you know if this code works just with the ".swf" ? Without a page with 
the Facebook's javascript and without "<div id="fb-root"></div>" ?

Just with AS ? 

Original comment by maximus...@gmail.com on 31 Mar 2011 at 6:14

GoogleCodeExporter commented 9 years ago
The only way you can do this without the HTML wrapper is by packaging in for 
AIR (make sure to use FacebookDesktop) or mobile (FacebookMobile) platform.

Original comment by rovertn...@gmail.com on 4 Apr 2011 at 8:44