I notice that Facebook SDK 3.0 has to have the LoginActivity declaration in Manifest file.
<activity android:name="com.facebook.LoginActivity"
android:label="@string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/applicationId" />
If it's not there, the below exception is thrown.
com.facebook.FacebookException: Cannot use SessionLoginBehavior SSO_WITH_FALLBACK when com.facebook.LoginActivity is not declared as an activity in AndroidManifest.xml
It seems a bad practice when Facebook SDK has to depend on this declaration. I wonder if there is a way to remove it from Manifest file.
About the applicationId missing, I can pass it in code by modifying some functions, LoginButton constructor and Session constructor.
When using the official build stack, you need to reference every Activity (that needs to be started) in your manifest. This is indeed counter-intuitive, since one would expect such things to be inherited from included libraries.
A process known as "manifest merging" is right now possible with the Maven build stack and with the new build system. Since the new build system is still work-in-progress, you just have to wait until it is being rolled out officially.
As the error suggests put the declaration as follow in your manifest:
<activity android:name="com.facebook.LoginActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="@string/app_name" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With