> For the complete documentation index, see [llms.txt](https://docs.ionicfirebaseapp.com/clothingapp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionicfirebaseapp.com/clothingapp/clothing-app/social-api.md).

# Social API

To create and setup for user login.

### **Create Facebook App ID and setup of user Login**

To use the FB plugin, you first have to create a new Facebook App with your Facebook developer portal at <https://developers.facebook.com/apps>.

![](https://4155143327-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LC95RbePjJy8XahbneR%2F-LCT4pwRddAyvIt-u8wp%2F-LCT5EAV_M6-Tb4EnzFe%2F70fdabe6-3792-40d4-8abe-51f53c962006.png?alt=media\&token=2d787415-a501-446c-bc57-7e0c498e2a66)

Retrieve the `App ID` and `App Name`

![](https://4155143327-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LC95RbePjJy8XahbneR%2F-LCT4pwRddAyvIt-u8wp%2F-LCT5NXozz6Pnkwz1m_h%2Fdoc4.png?alt=media\&token=da2dbedc-f75c-411e-9fb5-459a42ef9750)

Then type in the following command in your Terminal, where APP\_ID and APP\_NAME are the values from the Facebook Developer portal .

You can replace APP\_NAME and APP\_ID in config.xml file.

Now you'll need to add the native platforms you'll be using to your app in the Facebook Developer portal under your app's Settings:

![](https://4155143327-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LC95RbePjJy8XahbneR%2F-LCT4pwRddAyvIt-u8wp%2F-LCT5uzOG79eR7kGZIga%2Fdoc5.png?alt=media\&token=6a9d697a-79d5-4832-99ad-3fa2a5823946)

\
Click `'Add Platform'`

![](https://4155143327-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LC95RbePjJy8XahbneR%2F-LCT4pwRddAyvIt-u8wp%2F-LCT6-eSqP0qTCWAwgVW%2Fdoc6.png?alt=media\&token=f7bd5886-cee4-4be6-a795-eeef07801311)

Now you need to open your project's [`config.xml`](https://cordova.apache.org/docs/en/latest/config_ref/index.html)file, found in the root directory of your project.

You need to copy your id, You are free to keep any id that unique.<br>

![](https://4155143327-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LC95RbePjJy8XahbneR%2F-LCT4pwRddAyvIt-u8wp%2F-LCT673yqveRpX-YmRfd%2Fdoc7.png?alt=media\&token=e2c810c3-f6c6-4b47-ac66-977b0f4b1994)

### Check`Single Sign On.`

**Android Install**

Add platform android

Set your Google Play Package Name. You can find your name in your platforms/android/AndroidManifest.xml file.

\<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.ionicframework.ionic2fblogin864493" xmlns:android="\[\[\[\[[http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt)\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt))\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt)\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt\](http://schemas.android.com/apk/res/android"\&gt)))\\](http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt%29]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt%29%29]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt%29]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt]%28http://schemas.android.com/apk/res/android%22\&gt%29%29%29/));<br>

Check Single Sign On

```
Set the Class Name to com.facebook.FacebookActivity

Generate your own [Key Hash](https://ionicthemes.com/tutorials/about/ionic2-facebook-login).  please follow that tutorial how to create key Hash.
```

![](https://4155143327-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LC95RbePjJy8XahbneR%2F-LCT4pwRddAyvIt-u8wp%2F-LCT6XC2qkS7ExfkPw82%2Fdoc8.png?alt=media\&token=7dec56de-04d0-42e5-b1c8-34d857626cf1)

If you have follow all those setup properly, you will accomplish your mission :). You may also follow these article that might help you [ionic facebook native ](https://ionicframework.com/docs/native/facebook/)and [ionic facebook native 2](https://ionicthemes.com/tutorials/about/ionic2-facebook-login).
