Haxe OpenFL extension for Facebook, supports Facebook SDK for Android and iOS. On other platforms uses Facebook REST API and logins using a Webview.
##Usage example
Login the user to Facebook if needed:
var facebook = new Facebook();
if (facebook.accessToken!="") { // Only login if the user is not already logged in
onLoggedIn();
} else {
facebook.login( // Show login dialog
PermissionsType.Read,
["email", "user_likes"],
onLoggedIn,
onCancel,
onError
);
}
Send app invite:
// See https://developers.facebook.com/docs/applinks
AppInvite.invite("https://fb.me/1654475341456363");
Share a link on the users timeline:
Share.link(
"<a link to something>",
"<title>",
"<link to an image>",
"<description>"
);
Graph API:
facebook.get(
"/me/permissions", // Graph API endpoint
onSuccess, // Dynamic->Void
onError // Dynamic->Void
);
##License
The MIT License (MIT) - LICENSE.md
Copyright © 2012 SempaiGames (http://www.sempaigames.com)
Author: Daniel Uranga