-
Notifications
You must be signed in to change notification settings - Fork 349
Setup project
-
Add dependency (jCenter):
allprojects { repositories { jcenter() } }
Easily reference the library in your Android projects using this dependency in your module's
build.gradle
file:dependencies { compile 'com.sromku:simple-fb:4.1.1' }
-
Add to your
string.xml
your app_id:<string name="app_id">728615400528729</string>
-
Update the
manifest.xml
of your application and add next lines:<uses-permission android:name="android.permission.INTERNET" /> <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" /> <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.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider728615400528729" android:exported="true" />
You can see that the name of
authorities
is:com.facebook.app.FacebookContentProvider728615400528729<app_id>
Replace<app_id>
with you application id.
This setup is relevant to old versions of this library. The latest version that supports facebook sdk 4.2> wasn't adapted for Eclipse. Please start coding with Android Studio.
-
Clone Facebook SDK or download it. Then, import the project to your workspace.
-
Clone and import this (Simple Facebook) project to your workspace.
-
Add reference from
Simple Facebook
project toFacebookSDK
project. -
Now, you can add reference from your app to
Simple Facebook
project.
-
Setup 🔻
-
Login/Logout
-
Publish
-
Requests/Invite
-
Get
-
Additional options
-
Samples