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

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

Android Facebook SDK 3.0 gives “remote_app_id does not match stored id” while logging in

Another possible error (which happened with me) is: to set up a “Key Hash” at Facebook App Console and to sign the android app using another keystore. Unfortunately this is caused because Facebook Getting Started Tutorial induces this error. It says that android developers should use default android debug key in your examples and doesn’t … Read more

Upload photo to Facebook with Facebook Android SDK in Android

Just posted here the simple way to upload a photo: android facebook publish photo Code: byte[] data = null; Bitmap bi = BitmapFactory.decodeFile(photoToPost); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bi.compress(Bitmap.CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle params = new Bundle(); params.putString(“method”, “photos.upload”); params.putByteArray(“picture”, data); AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook); mAsyncRunner.request(null, params, “POST”, new SampleUploadListener(), null);

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