/shinnilfb

Simple "App invite on Facebook" module for Godot Game Engine

Primary LanguageJava

Donate

Simple App invite on Facebook module for Godot Game Engine (Android only).

To use it, make sure you're able to compile the Godot android template, you can find the instructions here.

For Godot 3.1.0 or higher, remove the line:

 implementation "com.android.support:support-core-utils:28.0.0"

from the file platform/android/build.gradle.template before compiling to avoid conflicts between the support libs.

Module name (engine.cfg):

[android]
modules="org/godotengine/godot/GodotFacebook"

Functions:

  • init(app_id)
  • appInvite(app_link_url, preview_image_url)

Example:

func _ready():
    if(Globals.has_singleton("GodotFacebook")):
        fb = Globals.get_singleton("GodotFacebook")
        fb.init(‘YOUR_APP_ID’)

(...)

func _on_share_button_pressed():
    if fb != null:
        fb.appInvite(“YOUR_APP_URL”, ‘YOUR_APP_IMG_URL’)

Any questions? Leave a comment on my blog http://shinnil.blogspot.com.br