Skip to content

Latest commit

 

History

History
100 lines (59 loc) · 4.33 KB

FacebookPortalSetup.md

File metadata and controls

100 lines (59 loc) · 4.33 KB

Facebook Portal Setup

1. Login to https://developers.facebook.com and create a new application.

Creating Application 1

Creating Application 2

Creating Application 3

2. Go to settings section to add your android and ios platforms.

Facebook Settings

Android Setup

3. Click on add platform and then select Android.

Add Android

Add Android 2

4. Generate a hash for the keystore you will sign the apk with and add the generated hash to android platform config.

Mac: keytool -exportcert -alias <KEY_STORE_ALIAS> -keystore <KEY_STORE_PATH> | openssl sha1 -binary | openssl base64
 
Windows: keytool -exportcert -alias <KEY_STORE_ALIAS> -keystore <KEY_STORE_PATH> | openssl sha1 -binary | openssl base64

Other alternative is to add the following code on the MainActivity OnCreate method to get the hash key printed on the application output:

            try
            {
                PackageInfo info = Android.App.Application.Context.PackageManager.GetPackageInfo(Android.App.Application.Context.PackageName, PackageInfoFlags.Signatures);
                foreach (var signature in info.Signatures)
                {
                    MessageDigest md = MessageDigest.GetInstance("SHA");
                    md.Update(signature.ToByteArray());

                    System.Diagnostics.Debug.WriteLine(Convert.ToBase64String(md.Digest()));
                }
            }
            catch (NoSuchAlgorithmException e)
            {
                System.Diagnostics.Debug.WriteLine(e);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e);
            }

Make sure to use the password that you set when you first created the keystore.

5. Add your package name and full class name for your Activity.

    <package name> + <namespace> + <class name>
    
    Example:
        com.crossgeeks.facebookclient.facebookclientsample.Droid.MainActivity

Add Android  Details

iOS Setup

6. Click on add platform then select iOS.

Add iOS

7. Enter the bundle identifier for your iOS application on iOs platform config.

Add iOS 2

Enable sharing content setup (Optional)

If your app is public on Facebook developer portal, you should be able to test sharing with any users.

Make Public

Make Public 2

Make Public 3

If your application isn't yet public then you need to add the users you want to be able to test sharing.

Add your testers.

Testers

Note: This will allow you to test any additional permissions needed just within your testers group since is not yet approved for public use, so will just work for people added on Roles section, until you submit for approval by clicking on Edit Details and following the steps described there. Until permissions are not on green state are not yet approved (This applies for all permissions that are not approved by default).

There are few permissions approved by default. Which are: "email" , "public_profile", "user_friends"

<= Back to Table of Contents