Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error compile in "Use Facebook Login" SDK

I have followed the Facebook "use Facebook Login" tutorial

However, when I load the app and click on "Login" I get the "com.facebook.FacebookException: Cannot use SessionLoginBehavior SSO_WITH_FALLBACK when com.facebook.LoginActivity is not declared as an activity in AndroidManifest.xml" error.

I definitely have added the activity in the AndroidManifest.xml file.

<?xml version="1.0" encoding="utf-8"?>

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.zwopper.LoginActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name="com.zwopper.MainActivity"
        android:label="@string/app_name" >
    </activity>
    <meta-data android:value="@string/app_id" android:name="com.facebook.sdk.ApplicationId"/>
</application>

Anyone know what is the problem?

(I have also added the *app_id* string to res/values/strings.xml, the INTERNET permission, the com.facebook.sdk.ApplicationId Meta Data)

Thanks.

like image 326
MegaBubbletea Avatar asked Feb 19 '13 06:02

MegaBubbletea


1 Answers

define activity in your mainfest

    <activity
        android:name="com.facebook.LoginActivity"
        android:label="@string/title_facebook_login" >
    </activity>
like image 106
Kapil Vats Avatar answered Sep 21 '22 06:09

Kapil Vats