Mobile Facebook

The Mobile Facebook add​on implements Facebook features to your mobile application on both Android and iOS.

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

The best benefit for this addon is that it supports all editors and runtimes of Construct. Both, Construct 2 and Construct 3.

It will integrate the native mobile Facebook features into your mobile application.

Intstructions

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

2. Enable the Debug Mode to log errors to the console. Only applicable if build as an .apk or .ipa and debugging through Chrome's mobile device inspect or Safari's web inspector.

3. To get the App ID and App Name property, retrieve it from your Facebook application's dashboard in the Facebook Developer Console.

4. The Facebook SDK version will be automatically updated when needed through Construct Master Collection releases. Although, just in case, you can set your own custom version through the SDK Version property.

To get the current Facebook SDK versions list, click here.

5. The plugin properties are not set up, if you already made the events for your project for Facebook integration using the Mobile Facebook, then you can proceed to build.

 

 6. This is very important! Not following these instructions will show a fb error.
 

  • If built for Android, you need to input your .apk's hash code into the Facebook Developer Console. For the instructions, click here.​ This is a manual process but it is a requirement by Facebook.
    There is also a separate
    priority documentation for this in the collection.
     

  • If built for iOS, you need to configure your facebook app settings. For the instructions, click here. This is also a manual process but it is a requirement by Facebook.
    There is also a separate
    priority documentation for this in the collection.

Finally, you're done and have fully integrated the native mobile Facebook SDK into your Construct 2 or Construct 3 game application.

That's the end of this guide, have a happy game development!

Actions, Conditions & Expressions

Actions

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

Facebook Login :

  • On Login Succeeded - Triggered when "Login" has Succeeded.

  • On Login Failed - Triggered when "Login" has Failed.

  • On Logout Succeeded - Triggered when "Logout" has Succeeded.

  • On Logout Failed - Triggered when "Logout" has Failed.

Retrieve Info :

  • On Get Status Succeeded - Triggered when the "Get Login Status" has Succeeded.

  • On Get Status Failed - Triggered when the "Get Login Status" fails.

  • Is Connected - Check if a Facebook Login was already established and connected successfully.


Facebook Analytics :

  • On Log Event Succeeded - Triggered when the "Log Event" has Succeeded.

  • On Log Event Failed - Triggered when the "Log Event" has Failed.

  • On Log Purchase Succeeded - Triggered when the "Log Purchase" has Succeeded.

  • On Log Purchase Failed - Triggered when the "Log Purchase" has Failed.

  • On Manual Log Activation - Triggered when the "Manual Log Activation" has Succeeded.

  • On Manual Log Activation Failed - Triggered when the "Manual Log Activation" has Failed.


Tools :

  • On Access Token Loaded - Triggered when the "Load Access Token" has finished.

  • On Access Token Load Failed - Triggered when the "Load Access Token" has failed. Happens when not logged in.

Share Dialog :

  • On Share Dialog Succeeded - Triggered when the "Share Dialog" has Succeeded.

  • On Share Dialog Failed - Triggered when the "Share Dialog" has Failed.


App Request :

  • On App Request Succeeded - Triggered when the "App Request" has Succeeded.

  • On App Request Failed - Triggered when the "App Request" has Failed.


Send Dialog :

  • On Send Dialog Succeeded - Triggered when the "Send Dialog" has Succeeded.

  • On Send Dialog Failed - Triggered when the "Send Dialog" has Failed.


Graph API :

  • On Graph API Succeeded - Triggered when the "Graph API" has Succeeded.

  • On Graph API Failed - Triggered when the "Graph API" has Failed.

Expressions

Tools :

  • loadAccessToken - Return the "Access Token" from the "Get Access Token" action.

 


Graph API :

  • getGraphAPIData - Get the Graph API Data Object.

Facebook Status :

  • getAccessToken - Get the Access Token from "Login" or "Get Status".

  • getExpiresIn - Get the Expiration Time. Indicates the UNIX time when the token expires and needs to be renewed.

  • getUserID - Get the Facebook User ID. The ID of the person using the app.

  • getStatus - Get the Facebook Connection Status. Either "connected", "not_authorized" or "unknown".

Properties

Universal - General Plugin Properties.

  • Debug Mode - If "Enabled", the runtime will log errors. This should be "Disabled" on production.

    • Enabled

    • Disabled


Facebook Credentials - Input here the Facebook Credentials. This is important, otherwise you'll receive a build failure.

  • App ID - The Facebook Application ID found at the Facebook Developers : Console.

  • App Name - The Facebook Application Name found at the Facebook Developers : Console.

  • SDK Version - The Facebook SDK Version to be used. The default value changes on every update. Default: "5.0.0".

Game Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Features

The Mobile Facebook  is an addon that integrates the native mobile Facebook SDK into an application made by Construct 2 or Construct 3 with support for both android and ios.
It allows you to use the various tools Facebook provides to implement for your application.

Features :

  • Full native Android SDK integration.

  • Full native iOS SDK integration.

  • Facebook Graph API call.

  • Facebook Analytics.

  • Easy to use and no programming required.

  • Well-supported and fully tested.

  • Facebook Authentication

  • Facebook App Request.

  • Facebook Share Dialog.

  • Facebook Send Dialog.

  • Facebook Profile Information.

  • Facebook Server Access Token.

  • Construct 2 editor support.

  • Construct 3 editor support.

  • Construct 2 runtime.

  • Construct 3 runtime.

  • C3 Build Service, PhoneGap.

  • Cordova CLI & Android Studio.

Feature Showcase

The Mobile Facebook  is an addon that integrates the native mobile Facebook SDK into an application made by Construct 2 or Construct 3 with support for both android and ios.
It allows you to use the various tools Facebook provides to implement for your application.

 
 
 
 
 
 

Get the tools

for your pro games!

Constuct Master Collection - Itch.io
Constuct Master Collection - Discord
Constuct Master Collection - Construct 3

© Construct Master Collection 2020 • All rights reserved

Contact Information: