background preloader

Facebook

Facebook Twitter

For Websites - Développeurs Facebook. As mentioned, the code above uses the common defaults for the options available when initializing the SDK. You can customize some of these options, if useful. Changing SDK Language In the basic setup snippet, the en_US version of the SDK is initialized, which means that all the dialogs and UI will be in US English. You can change this language by changing the js.src value in the snippet. Take a look at Localization to see the different locales that can be used. <script> (function(d){ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/es_LA/all.js"; d.getElementsByTagName('head')[0].appendChild(js); }(document)); </script> Disabling Login Status Check By setting status to true in the FB.init() call, the SDK will attempt to get info about the current user.

Setting status to false can improve page load times, but you'll need to manually check for login status using FB.getLoginStatus. Extended Permissions - Développeurs Facebook. As a general rule, the more permissions an app requests, the less likely it is that people will use Facebook to log into your app. In fact, our research shows that apps that ask for more than four permissions experience a significant drop off in the number of completed logins. Additionally publishing permissions (publish_actions) will prompt a second step in the Login dialog, which can cause fewer people to log in: Here are a few guidelines to use when asking for permissions, both during and after login: Only ask for the permissions that are essential to an app.Ask for permission in the context in which they are required.

For example, if your app wants to show places of interest near a person's home, asking for user_location just prior to displaying that information would give the person a greater understanding of why the permission is being requested.Use any available public profile information before asking for a permission. Publishing Permissions. Authentification - Développeurs Facebook. Implementing Facebook OAuth 2.0 Authentication in Java | Pragmatic Coder : Java, Wicket and the Web. Published Wed, 30 Jun 2010 • 100 comments I recently switched onmydoorstep.com.au's Facebook login feature from the old "Facebook Connect" API implemented with facebook-java-api over to the new Facebook Graph API / OAuth 2.0 authentication.

This was far easier to implement than the original authentication, particular under Apache Wicket, but it should be easier regardless of your Java framework of choice. Here's how I did it. First I developed a basic "magic" class for the Facebook API - You'll need the visural-common library for some of the code above.

I want the "email" and "publish_stream" extended permissions, so that I can get the user's email address and post updates back to their stream in Facebook. The process of authentication is simple. Due to the way Apache Wicket works, I implemented a Servlet Filter for the "redirect_uri" (/fbauth) - Your "UserService" might look something like - So, just to recap, the sequence of authentication is as follows - Anyhow, hope it helps someone out! Graph API Overview - Développeurs Facebook.