Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error compile in "Use Facebook Login example"

I'm trying to create the Login Application in this tutorial:

I'm getting this error in my logcat:

11-22 15:57:53.863: E/AndroidRuntime(816): com.facebook.FacebookException: Cannot use SessionLoginBehavior SSO_WITH_FALLBACK when com.facebook.LoginActivity is not declared as an activity in AndroidManifest.xml 

Anyone know why?

like image 926
Pootree Kun Avatar asked Nov 22 '12 09:11

Pootree Kun


Video Answer


2 Answers

May you forgot to define Activity in your AndroidManifest.xml

<activity     android:name="com.facebook.LoginActivity"     android:label="@string/title_facebook_login" > </activity> 
like image 169
Pratik Butani Avatar answered Sep 28 '22 16:09

Pratik Butani


I had the same problem and it was because I forgot to add the com.facebook.LoginActivity activity to AndroidManifest.xml.

Also check that you followed the steps on the "Create a new Android Project with Facebook Login" section on https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/ , specially those regarding adding the app_id string to res/values/strings.xml, the INTERNET permission, the com.facebook.sdk.ApplicationId Meta Data, and finally the mentioned LoginActivity.

like image 42
Enrique Alcor Avatar answered Sep 28 '22 17:09

Enrique Alcor