2

I am trying to integrate facebook with my app. The method is called this way. R.string.app_id contains the app id that I got from facebook.

public class App extends Application {

    @Override public void onCreate() {
        super.onCreate();



        Parse.initialize(this, "XgoD***********************", "LnEQ****************************");

        ParseFacebookUtils.initialize(getString(R.string.app_id));




    }


}

The app crashes when the method is called. I think it may be something wrong with the manifest, though I'm not sure what it could be. Here's the manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.federuiz.boliches.bApp" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <application
        android:name=".App"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            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=".BolicheActivity"
            android:label="@string/title_activity_main_activity2" >
        </activity>
        <activity
            android:name=".ContactosActivity"
            android:label="@string/title_activity_contactos" >
        </activity>
        <activity
            android:name=".MyActivity"
            android:label="@string/title_activity_my" >
        </activity>
        <activity
            android:name=".DetalleContacto"
            android:label="@string/title_activity_detalle_contacto" >
        </activity>

        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyC4u_bmYnj4Pu2cM67F6k_BwlE2wkqslT8" />
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/app_id" />

    </application>

</manifest>

Googling has been pretty fruitless, and the Parse.com docs are really vague when it comes to integrating with Facebook. I followed the instructions as best as I could. Parse itself works perfectly with the app.

rici
  • 234,347
  • 28
  • 237
  • 341

0 Answers0