facebook-android-sdk
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
Something similar to Cocoa Pods and Bundler for Android (for dependencies)?
Gradle + Maven Central seems to be the Android equivalent.
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 SDK 3 EOFException
The problem This is a HttpURLConnection related issue. The actual socket used for the connection is selected from a pool. Most servers create persistent connections (Connection: Keep-Alive header) in order to reuse existing sockets which is cheaper than creating a new one every single time. The problem comes from the fact that these sockets are … 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
Android Gradle build with sub projects
settings.gradle must define all the modules. It won’t load other settings.gradle found in the tree to load more module. You’ll have to either define a module for the facebook SDK in the top level settings.gradle. Yes it’s redundant with the other settings.gradle. publish Project B somehow (as well as its dependencies so in this case … 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>
Facebook 3.0 Android second login attempt returns “Session state closed”
It’s ok for me with states. I have open and close states as needed.
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