Unable to resolve dependency Android Studio 3.0

After some research I have solved this issue. Step 1-: I disable the Gradle offline work in settings. File > Settings > Build, Execution, Deployment > Gradle > Uncheck Offline Work Step 2-: Then, I just changed compile ‘com.facebook.android:account-kit-sdk:4.+’ to api ‘com.facebook.android:account-kit-sdk:4.+’ I don’t know exactly why it’s work. I see api in docs Reference … 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

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