Understanding how Facebook SDK works in general
Facebook has millions of users worldwide and chances are very high that your app users have a Facebook account too. asking users to fill in a long registration signup form will make most of them off your app and you really don’t want that. using social network SDKs will not only make your job easier as a developer, but it will also help your users sign in to your app faster. no form to fill in, no email verification steps. its fast, its secure and its so easy. here I am going to talk about what you can get from Facebook SDK because it’s not just limited to login/out service. a Facebook SDK can do a lot more to help your app grow.
To be able to use Facebook SDK features in your app, you need to create a Facebook app in your Facebook developer console. and then you need to connect this Facebook app to your Adobe Air app. we will discuss all these steps in great details later but the below figure will give you an overall idea of how this connection will be made.
What you can expect from Facebook SDK ANE
- Login/logout users to your app
- share content on Facebook (no login required)
- Add Facebook “like” buttons to your app (no login required)
- access Facebook Graph API
Login/logout – When you ask your users to login to your app via Facebook, you are actually asking for their permission to access their personal information available on Facebook. depending on how your app works, you may ask for different permissions from your users and they will see these requests. they may accept or reject them. in both cases, you will know their decision back in your app and you can adjust the logic of your app.
You should be very careful when asking for these permissions so ask only for those which are necessary for your app logic. even if you need super personal permissions, it’s generally a good idea not to scare your users off by asking them for those permissions too soon. give your users some time to get to know your app better. you can always ask for more permissions later when you really need them.
share content – Facebook SDK ANE lets your app users to share URLs on their Facebook wall. For this feature to work, you won’t need to login users although you can have more control over this feature if they are logged in. we will talk more about this topic in future posts.
Facebook “like” button – Adding interactive like buttons embedded into your Adobe Air apps can be so cool. users don’t need to be logged in to your app and they still can touch the like button to like a URL you have specified. you can create as many like buttons as you like in your project and control their position by setting their x, y location on stage.
Graph API – Facebook SDK ANE gives you access to call Graph API and if you are logging in users into your app, you can request more information from the Graph. working with the Graph API can be very exciting but complex! depending on what permissions your users has granted your app, you can do things like knowing their friends, interests and their timeline. you can write on their walls directly or send messages. it all relies on your imagination!