top of page

Mobile Facebook (Legacy)

The Mobile Facebook (Legacy) plugin is specifically designed to implement native Facebook features in the Facebook Android SDK and Facebook iOS SDK in your applications in Android and iOS, for games built in Construct 3 and Construct 2.


Features including calling the graph api, facebook analytics, facebook authentication, facebook profile information, facebook app requests, send and share, facebook server credentials and facebook access token.


The Mobile Facebook (Legacy) plugin supports both Construct 3 editor and Construct 2 editor.


Note: Please migrate and use the new Mobile Facebook plugin which has support for the latest Facebook Android SDK and Facebook iOS SDK. The new plugin includes new features from the latest Facebook SDKs such as Facebook Tracking that replaced the previous Facebook Analytics.



PlayFab API v2.png

Introduction

Step 1.png

The Construct Master Collection supports the full and easy integration of native mobile Android SDKs and iOS SDKs for both Construct 3 and Construct 2.


Please click here to learn more about Mobile.

Features


The Mobile Facebook (Legacy) plugin is specifically designed to implement native Facebook features in the Facebook Android SDK and Facebook iOS SDK in your applications in Android and iOS, for games built in Construct 3 and Construct 2.


Features including calling the graph api, facebook analytics, facebook authentication, facebook profile information, facebook app requests, send and share, facebook server credentials and facebook access token.


Note: Please migrate and use the new Mobile Facebook plugin which has support for the latest Facebook Android SDK and Facebook iOS SDK. The new plugin includes new features from the latest Facebook SDKs such as Facebook Tracking that replaced the previous Facebook Analytics.


Here are some of the native features of the mobile plugin:

  • Facebook integration

  • Facebook Analytics integration

  • Facebook Android SDK

  • Facebook iOS SDK

  • Facebook Connect

  • Graph API Calls

  • App Request

  • Share Dialog

  • Send Dialog

  • Facebook Profile

  • Server Access Token

For more information about native mobile or Android and iOS features, please click here to learn the introductory lessons to Mobile.


Platform Integration


Here are some of the platforms that are natively supported:

  • Android

  • iOS

  • Native Android

  • Native iOS


Build Support


Here are some of the supported build options:


Editor Features


Here are some of the features in the Construct editor:

  • Construct 3

  • Construct 2

Introduction
Features

How to use?

It is easy to use the Mobile Facebook plugin, you will only need to follow the steps below.

1. The first step is to add the Mobile Facebook object into the project.


2. To enable logs in the console for mobile debugging, enable the Debug Mode property in the Properties bar.



3. To get the App Id and App Name properties, retrieve them from your Facebook application's dashboard in the Meta for Developers console.

Instructions
Documentation

Documentation

Here are the following official documentation and guides into setting up your Facebook application in the Meta for Developers.


Facebook Developer


There are some few steps required by Meta to properly integrate the Meta (Facebook) Android SDK and Meta (Facebook) iOS SDK.


Android


  • If built for Android, you need to input your application's hash code into your application's configuration from the Meta Developer Console's Facebook application dashboard.

  • For instructions in how to do this, please click the link to visit Meta's official documentation.

  • [Tip]: If you export your application into a debug .apk or release .apk, your application will show an error that its hash code is invalid and unregistered in the Facebook application dashboard in the Meta Developer Console. You can copy the hash code shown in the error with the format similar to the image above, and paste it into the Meta Developer Console, similar to the image above and documentation.


iOS

ACEs

Actions, Conditions & Expressions

Actions

The following action groups:

  • Facebook Login

  • Retrieve Info

  • Show Dialog

  • Advanced : Graph API

  • Facebook Analytics : Log Event

  • Facebook Analytics

  • Tools

Facebook Login

  • Login - Login to Facebook. This automatically "Gets Status" and update the expressions.

    • Permissions - Example : "public_profile", "email", "user_friends". Separate each permissions with a coma.


  • Logout - Logout of Facebook.



Retrieve Info

  • Get Status - Retrieve the Login Status for the expressions. Overwrites the expressions from login.


Show Dialog

  • Share Dialog - Prompt a Facebook Share Dialog.

    • URL - The Share URL Link.

    • Caption - The Share Caption.

    • Description - The Share Description.

    • Picture - The URL for the picture.

    • HashTag - Example: "#myHashtag". Leave blank if not needed.

    • Name - The Share Name. Leave blank if not needed.

    • Message - The Share Message. Leave blank if not needed.


  • App Request - Prompt a Facebook Game Request Dialog to non-app users.

    • Title - The "Title" for the Game App Request.

    • Message - The "Message" for the Game App Request.

    • Data - The "Data" for the Game App Request.

    • Picture - The URL for the picture. Leave blank if not needed.


  • Send Dialog - Prompt a Facebook Send Dialog.

    • URL - The "URL" for the Send Dialog.

    • Caption - The "Caption" for the Send Dialog.

    • Description - The "Description" for the Send Dialog.

    • Picture - The "Picture" for the Send Dialog.

    • Name - The Share Name. Leave blank if not needed.

    • Message - The Share Message. Leave blank if not needed.


Advanced : Graph API

  • Call Graph API - Allows access to the Facebook Graph API. This API allows for additional permission because, unlike login, the Graph API can accept multiple permissions.

    • Request Path - The Request Path for the Graph API.

    • Permissions - Example : "email", "user_friends". Separate each permissions with a coma.


Facebook Analytics : Log Event

  • Add Log Data Parameter - Add an extra data to log with the event. (This is optional).

    • Key - The "Key" of the Data.

    • Value - The "Value" of the Data.

  • Log Event - Log an Event using Facebook Analytics.

    • Name - The "Name" of the Event.

    • Increment Value - The value to add to all the sum of this event across the application.


Facebook Analytics

  • Log Purchase - Log a Purchase using Facebook Analytics.

    • Value - The "Value" of the Purchase.

    • Currency - The "Currency" of the Purchase. Must be in ISO 4217 currency code. For Example, "USD" or "PHP".


  • Manually Log : Activate App - Usually this is not needed as it is always automated. But just in case, this logs that the App is activated using Facebook Analytics.


Tools

  • Load Access Token - Load the Access Token from the Login Status. This will return the value to the expression "loadAccessToken".

Conditions

The following condition groups:

  • Facebook Login

  • Retrieve Info

  • Facebook Analytics

  • Tools

  • Share Dialog

  • App Request

  • Send Dialog

  • Graph API