Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.

Setup project

Roman Kushnarenko edited this page Oct 29, 2014 · 17 revisions
  1. Clone Facebook SDK or download it. Then, import the project to your workspace.

  2. Clone and import this (Simple Facebook) project to your workspace.

  3. Add reference from Simple Facebook project to FacebookSDK project.

    Screenshot

  4. Now, you can add reference from your app to Simple Facebook project.

  5. Add to your string.xml your app_id:

    <string name="app_id">728615400528729</string>
  6. Update the manifest.xml of your application and add next lines:

    <uses-permission android:name="android.permission.INTERNET" />
    
    <activity
    	android:name="com.facebook.LoginActivity"
    	android:label="@string/app_name"
    	android:theme="@android:style/Theme.Translucent.NoTitleBar" />
    
    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/app_id" />

    If you are going to use publishing actions with dialog then add to you manifest this:

    <provider
            android:name="com.facebook.NativeAppCallContentProvider"
            android:authorities="com.facebook.app.NativeAppCallContentProvider728615400528729"
            android:exported="true" />

    You can see that the name of authorities is: com.facebook.app.NativeAppCallContentProvider<app_id>
    Replace <app_id> with you application id.

Clone this wiki locally