using facebook sdk in Android studio

NOTE For Android Studio 0.5.5 and later, and with later versions of the Facebook SDK, this process is much simpler than what is documented below (which was written for earlier versions of both). If you’re running the latest, all you need to do is this: Download the Facebook SDK from https://developers.facebook.com/docs/android/ Unzip the archive In … Read more

FacebookSdk.sdkInitialize (Context) is deprecated

From the documentation about upgrading SDK: The Facebook SDK is now auto initialized on Application start. If you are using the Facebook SDK in the main process and don’t need a callback on SDK initialization completion you can now remove calls to FacebookSDK.sdkInitialize. If you do need a callback, you should manually invoke the callback … Read more

Android Facebook 4.0 SDK How to get Email, Date of Birth and gender of User

That’s not the right way to set the permissions as you are overwriting them with each method call. Replace this: mButtonLogin.setReadPermissions(“user_friends”); mButtonLogin.setReadPermissions(“public_profile”); mButtonLogin.setReadPermissions(“email”); mButtonLogin.setReadPermissions(“user_birthday”); With the following, as the method setReadPermissions() accepts an ArrayList: loginButton.setReadPermissions(Arrays.asList( “public_profile”, “email”, “user_birthday”, “user_friends”)); Also here is how to query extra data GraphRequest: private LoginButton loginButton; private CallbackManager callbackManager; @Override … Read more

Openssl is not recognized as an internal or external command

Well at the place of OpenSSL … you have to put actually the path to your OpenSSL folder that you have downloaded. Your actual command should look like this: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | “C:\Users\abc\openssl\bin\openssl.exe” sha1 -binary | “C:\Users\abc\openssl\bin\openssl.exe” base64 Remember, the path that you will enter will be the path where you … Read more