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

Facebook authentication without login button

@erdomester, @sromku Facebook launch new sdk version 4.x where Session is deprecated, There new concept of login as from facebook LoginManager and AccessToken – These new classes perform Facebook Login So, Now you can access Facebook authentication without login button as layout.xml <Button android:id=”@+id/btn_fb_login” …/> MainActivity.java private CallbackManager mCallbackManager; @Override public void onCreate(Bundle savedInstanceState) { … Read more

How to solve Facebook tools:replace=”android:theme”?

1) Add xmlns:tools=”http://schemas.android.com/tools” to <manifest> element at AndroidManifest 2) Add tools:replace=”android:theme” to (facebook activity) <activity> Here is my manifest file <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.company.product” xmlns:tools=”http://schemas.android.com/tools”> … <application android:allowBackup=”true” android:label=”@string/app_name” android:icon=”@mipmap/ic_launcher” android:theme=”@style/AppTheme” android:name=”MyApplication”> <activity android:name=”.MainActivity” android:label=”@string/app_name” android:screenOrientation=”portrait” android:configChanges=”keyboard|keyboardHidden|orientation|screenSize”> <intent-filter> … </intent-filter> </activity> <!–FacebookActivity–> <activity tools:replace=”android:theme” android:name=”com.facebook.FacebookActivity” android:configChanges=”keyboard|keyboardHidden|screenLayout|screenSize|orientation” android:label=”@string/app_name” android:theme=”@android:style/Theme.Translucent.NoTitleBar”/> … </application> </manifest>

How to programmatically log out from Facebook SDK 3.0 without using Facebook login/logout button?

Update for latest SDK: Now @zeuter’s answer is correct for Facebook SDK v4.7+: LoginManager.getInstance().logOut(); Original answer: Please do not use SessionTracker. It is an internal (package private) class, and is not meant to be consumed as part of the public API. As such, its API may change at any time without any backwards compatibility guarantees. … Read more

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

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

tech