[Plugin] [FREE] Facebook for Android

Hello,

I would like to share a plugin i was working for my games. It integrates some basic functionality for Facebook sdk. Currently supports only Android. Some of you might find it useful for your projects too.

You can get the plugin here: https://github.com/PandoraEntertainment/Facebook

To use the plugin you have to setup minimum SDK version at Android settings to 21 and NDK LEVEL API to android-23.

…\Documents\Unreal Projects\YourProject\Plugins\FacebookSDK\lib\Android\res\values, you have to open FacebookID.xml and and use your Facebook APP_ID from facebook dashboard:



<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="facebook_app_id"></string><!-- Replace with your Facebook APP_ID -->
</resources>


At FacebookSDK_APL file you have to add yoUR APP_ID at the following manifest additions:



 <!-- Replace with your Facebook APP_ID -->
     <provider android:authorities="com.facebook.app.FacebookContentProvider${APP_ID}"
          android:name="com.facebook.FacebookContentProvider"
          android:exported="true" />


and then at gameActivityClassAdditions section replace the strings with your applinkUrl and previewImageUrl.




String appLinkUrl = "";//Replace with your applinkUrl

String previewImageUrl = "";////Repplace with your previewImageUrl



Don’t forget to follow all the instructions at Facebook dashboard and complete all required information and settings.

Bellow are few images showing the blueprint nodes available:

In order to use the Login Events create an actor blueprint, add Facebook sdk component and add it to your level.

With the App Invite node you can invite your Facebook friends to your game.

With the share photo you can share a photo from your game. You need to specify the AppName, it is the same as what you have on your package name, com.yourcompany.yourgame and the name of the file. For example MyScreenshot.png

To get a screenshot i am using the Screenshot method at my sharing plugin:https://github.com/PandoraEntertainment/Sharing

If you want to target devices with minimum target sdk below 21 you can try using the facebook 4.10.1 aar, but i haven’t tested it with this version, I think i have fix some errors during packaging regarding the aar res files, but i abandoned and start working with 4.18.0 version of facebook sdk.

In the FacebookSDK_APL file:



 <AARImports>
    <insertValue value="repository $S(PluginDir)/../../ThirdParty/repository"/>
    <insertNewline/>
    <insert>com.facebook,Facebook,4.18.0</insert>
    <insertNewline/>
  </AARImports>

replace with:


 <AARImports>
    <insertValue value="repository $S(PluginDir)/../../ThirdParty/repository"/>
    <insertNewline/>
    <insert>com.facebook,Facebook,4.10.1</insert>
    <insertNewline/>
  </AARImports>



For those that will like to get profile images, friends lists, or have leaderboards, achievements i won’t integrate those from Facebook, but i can achieve this functionality already and with a much more flexibility, in my opinion, by using Playfab

By just getting the facebook access token, i can get info about user profile and their friends, download user profile picture and those of their friends etc.

I will update this thread too: https://forums.unrealengine.com/showthread.php?127487-FREE-AdColony-AppLovin-Chartboost-UnityAds-Vungle-Sharing-OneSignal-Facebook-Everyplay

Hey ur plugins are awesome, but i tried to used it in my game, i package the plugins for Mac and android, when i try to package the apk i got those error


Running UnrealHeaderTool "/Users/------/Documents/Games/PixelBoxChallenge/UE4 Project/Pixelboxchallenge.uproject" "/Users/------/Documents/Games/PixelBoxChallenge/UE4 Project/Intermediate/Build/Android/Pixelboxchallenge/Development/Pixelboxchallenge.uhtmanifest" -LogCmds="loginit warning, l
ogexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
UATHelper: Packaging (Android (All)): UnrealBuildTool: /Users/Shared/UnrealEngine/4.13/Engine/Plugins/EpicLeaderboard/Source/EpicLeaderboard/Classes/EpicLeaderboardObject.h(16) : Property is exposed to the editor or blueprints but has no Category specified.
UATHelper: Packaging (Android (All)): UnrealBuildTool: Error: Failed to generate code for Pixelboxchallenge - error code: OtherCompilationError (5)
UATHelper: Packaging (Android (All)): UnrealBuildTool: UnrealHeaderTool failed for target 'Pixelboxchallenge' (platform: Android, module info: /Users/------/Documents/Games/PixelBoxChallenge/UE4 Project/Intermediate/Build/Android/Pixelboxchallenge/Development/Pixelboxchallenge.uhtmanifest).
UATHelper: Packaging (Android (All)): CommandUtils.Run: Run: Took 35.22691s to run mono, ExitCode=5
UATHelper: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): /Users/Shared/UnrealEngine/4.13/Engine/Binaries/DotNET/UnrealBuildTool.exe Pixelboxchallenge Android Development -Project="/Users/------/Documents/Games/PixelBoxChallenge/UE4
 Project/Pixelboxchallenge.uproject"  "/Users/------/Documents/Games/PixelBoxChallenge/UE4 Project/Pixelboxchallenge.uproject"  -remoteini="/Users//Documents/Games/PixelBoxChallenge/UE4 Project" -noxge -nocreatestub -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2017.02.23-12.11.42.txt' 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunAndLog (System.String App, System.String CommandLine, System.String Logfile, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars, AutomationTool.SpewFilterCallbackType SpewFilterCallback) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunAndLog (AutomationTool.CommandEnvironment Env, System.String App, System.String CommandLine, System.String LogName, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars, AutomationTool.SpewFilterCallbackType SpewFilterCallback)
 [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, System.String CommandLine, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, UnrealBuildTool.FileReference Project, System.String Target, System.String Platform, System.String Config, System.String AdditionalArgs, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x0
0000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.UE4Build.BuildWithUBT (System.String TargetName, UnrealTargetPlatform TargetPlatform, System.String Config, UnrealBuildTool.FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, System.String InAddArgs, Boolean Fo
rceUnity, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.UE4Build.Build (AutomationTool.BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, System.Collections.Generic.Dictionary`2 PlatformEnvVars, Nullab
le`1 InChangelistNumberOverride, System.Collections.Generic.Dictionary`2 InTargetToManifest) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at Project.Build (AutomationTool.BuildCommand Command, AutomationTool.ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at BuildCookRun.ExecuteBuild () [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.BuildCommand.Execute () [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Automation.Execute (System.Collections.Generic.List`1 CommandsToExecute, Tools.DotNETCommon.CaselessDictionary.CaselessDictionary`1 Commands) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Automation.Process (System.String] Arguments) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Program.MainProc (System.Object Param) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.InternalUtils.RunSingleInstance (System.Func`2 Main, System.Object Param) [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Program.Main () [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Android (All)): RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults:Error: Error Unknown Error

i use PlayFab plugins and Epicleaderboard too and i dont have problem with those, the problem is when i enable the share and Facebook plugins

if u can help me fix this i’ll appreciate it a lot and apologies for my bad grammar i speak little English

Make an empty project and add the Sharing and Facebook plugins and attach here the log life to see what errors you are getting.

From the above i don’t see anything.

For Facebook try setting minimum sdk version to 21 and and NDK API LEVEL at Android SDK settings to 23 and check if it is working.

I have an app with playfab, facebook, and sharing plugin and working fine.

here the full Log:



Project.Build: ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Android (All)): CommandUtils.Run: Run: mono "/Users/Shared/UnrealEngine/4.13/Engine/Binaries/DotNET/UnrealBuildTool.exe" Plugins Android Development -Project=/Users//Documents/Games/TestPlugins/Plugins/Plugins.uproject  /Users//Documents/Games/TestPlugins/Plugins/Plugins.uproject  -remoteini="/Users//
Documents/Games/TestPlugins/Plugins" -noxge -generatemanifest -nocreatestub -NoHotReload
UATHelper: Packaging (Android (All)): UnrealBuildTool: Performing full C++ include scan (building a new target)
UATHelper: Packaging (Android (All)): UnrealBuildTool: NDK version: 23, GccVersion: 4.9
UATHelper: Packaging (Android (All)): UnrealBuildTool: building WITHOUT VULKAN define
UATHelper: Packaging (Android (All)): UnrealBuildTool: Vulkan SDK is installed, but the project disabled Vulkan (bSupportsVulkan setting in Engine). Disabling Vulkan RHI for Android
UATHelper: Packaging (Android (All)): CommandUtils.Run: Run: Took 6.577758s to run mono, ExitCode=0
UATHelper: Packaging (Android (All)): CommandUtils.Run: Run: mono "/Users/Shared/UnrealEngine/4.13/Engine/Binaries/DotNET/UnrealBuildTool.exe" Plugins Android Development -Project=/Users//Documents/Games/TestPlugins/Plugins/Plugins.uproject  /Users//Documents/Games/TestPlugins/Plugins/Plugins.uproject  -remoteini="/Users//
Documents/Games/TestPlugins/Plugins" -noxge -nocreatestub -NoHotReload -ignorejunk
UATHelper: Packaging (Android (All)): UnrealBuildTool: Creating makefile for Plugins (no existing makefile)
UATHelper: Packaging (Android (All)): UnrealBuildTool: Performing full C++ include scan (no include cache file)
UATHelper: Packaging (Android (All)): UnrealBuildTool: NDK version: 23, GccVersion: 4.9
UATHelper: Packaging (Android (All)): UnrealBuildTool: building WITHOUT VULKAN define
UATHelper: Packaging (Android (All)): UnrealBuildTool: Vulkan SDK is installed, but the project disabled Vulkan (bSupportsVulkan setting in Engine). Disabling Vulkan RHI for Android
UATHelper: Packaging (Android (All)): UnrealBuildTool: Parsing headers for Plugins
UATHelper: Packaging (Android (All)): UnrealBuildTool:   Running UnrealHeaderTool "/Users//Documents/Games/TestPlugins/Plugins/Plugins.uproject" "/Users//Documents/Games/TestPlugins/Plugins/Intermediate/Build/Android/Plugins/Development/Plugins.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -Wa
rningsAsErrors -installed
UATHelper: Packaging (Android (All)): UnrealBuildTool: /Users/Shared/UnrealEngine/4.13/Engine/Plugins/EpicLeaderboard/Source/EpicLeaderboard/Classes/EpicLeaderboardObject.h(16) : Property is exposed to the editor or blueprints but has no Category specified.
UATHelper: Packaging (Android (All)): UnrealBuildTool: Error: Failed to generate code for Plugins - error code: OtherCompilationError (5)
UATHelper: Packaging (Android (All)): UnrealBuildTool: UnrealHeaderTool failed for target 'Plugins' (platform: Android, module info: /Users//Documents/Games/TestPlugins/Plugins/Intermediate/Build/Android/Plugins/Development/Plugins.uhtmanifest).
UATHelper: Packaging (Android (All)): CommandUtils.Run: Run: Took 38.524047s to run mono, ExitCode=5
UATHelper: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): /Users/Shared/UnrealEngine/4.13/Engine/Binaries/DotNET/UnrealBuildTool.exe Plugins Android Development -Project=/Users//Documents/Games/TestPlugins/Plugins/Plugins.upro
ject  /Users//Documents/Games/TestPlugins/Plugins/Plugins.uproject  -remoteini="/Users//Documents/Games/TestPlugins/Plugins" -noxge -nocreatestub -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2017.02.24-05.32.48.txt' 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunAndLog (System.String App, System.String CommandLine, System.String Logfile, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars, AutomationTool.SpewFilterCallbackType SpewFilterCallback) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunAndLog (AutomationTool.CommandEnvironment Env, System.String App, System.String CommandLine, System.String LogName, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars, AutomationTool.SpewFilterCallbackType SpewFilterCallback)
 [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, System.String CommandLine, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, UnrealBuildTool.FileReference Project, System.String Target, System.String Platform, System.String Config, System.String AdditionalArgs, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x0
0000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.UE4Build.BuildWithUBT (System.String TargetName, UnrealTargetPlatform TargetPlatform, System.String Config, UnrealBuildTool.FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, System.String InAddArgs, Boolean Fo
rceUnity, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.UE4Build.Build (AutomationTool.BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, System.Collections.Generic.Dictionary`2 PlatformEnvVars, Nullab
le`1 InChangelistNumberOverride, System.Collections.Generic.Dictionary`2 InTargetToManifest) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at Project.Build (AutomationTool.BuildCommand Command, AutomationTool.ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at BuildCookRun.ExecuteBuild () [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.BuildCommand.Execute () [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Automation.Execute (System.Collections.Generic.List`1 CommandsToExecute, Tools.DotNETCommon.CaselessDictionary.CaselessDictionary`1 Commands) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Automation.Process (System.String] Arguments) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Program.MainProc (System.Object Param) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.InternalUtils.RunSingleInstance (System.Func`2 Main, System.Object Param) [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Program.Main () [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Android (All)): RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults:Error: Error Unknown Error


Captura de pantalla 2017-02-24 a las 5.36.34 a.m..png

This one is from an new project only with Sharing and Facebook plugin?

Because i still see this message:/Users/Shared/UnrealEngine/4.13/Engine/Plugins/EpicLeaderboard/Source/EpicLeaderboard/Classes/EpicLeaderboardObject.h(16) : Property is exposed to the editor or blueprints but has no Category specified.

i deleted all plugins and just left Share and Facebook



UATHelper: Packaging (Android (All)): UnrealBuildTool: BUILD FAILED
UATHelper: Packaging (Android (All)): UnrealBuildTool: /Users//Documents/CODEWORKS/android-sdk-macosx/tools/ant/build.xml:597: The following error occurred while executing this line:
UATHelper: Packaging (Android (All)): UnrealBuildTool: /Users//Documents/CODEWORKS/android-sdk-macosx/tools/ant/build.xml:649: The following error occurred while executing this line:
UATHelper: Packaging (Android (All)): UnrealBuildTool: /Users//Documents/CODEWORKS/android-sdk-macosx/tools/ant/build.xml:694: null returned: 1
UATHelper: Packaging (Android (All)): UnrealBuildTool: 
UATHelper: Packaging (Android (All)): UnrealBuildTool: Total time: 21 seconds
UATHelper: Packaging (Android (All)): UnrealBuildTool: UnrealBuildTool Exception: System.IO.FileNotFoundException: /Users//Documents/Games/TestPlugins/Plugins/Intermediate/Android/APK/bin/Plugins-debug.apk does not exist
UATHelper: Packaging (Android (All)): UnrealBuildTool: File name: '/Users//Documents/Games/TestPlugins/Plugins/Intermediate/Android/APK/bin/Plugins-debug.apk'
UATHelper: Packaging (Android (All)): UnrealBuildTool:   at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)): UnrealBuildTool:   at UnrealBuildTool.UEDeployAndroid.MakeApk (UnrealBuildTool.AndroidToolChain ToolChain, System.String ProjectName, System.String ProjectDirectory, System.String OutputPath, System.String EngineDirectory, Boolean bForDistribution, System.String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncremental
Package, Boolean bDisallowPackagingDataInApk) [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)): UnrealBuildTool:   at UnrealBuildTool.UEDeployAndroid.PrepTargetForDeployment (UnrealBuildTool.UEBuildTarget InTarget) [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)): UnrealBuildTool:   at UnrealBuildTool.UnrealBuildTool.DoPostStartupStuffThatCanAccessConfigs (System.String] Arguments) [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)): CommandUtils.Run: Run: Took 460.787545s to run mono, ExitCode=5
UATHelper: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): /Users/Shared/UnrealEngine/4.13/Engine/Binaries/DotNET/UnrealBuildTool.exe Plugins Android Development -Project=/Users//Documents/Games/TestPlugins/Plugins/Plugins.upro
ject  /Users//Documents/Games/TestPlugins/Plugins/Plugins.uproject  -remoteini="/Users//Documents/Games/TestPlugins/Plugins" -noxge -nocreatestub -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2017.02.24-06.18.37.txt' 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunAndLog (System.String App, System.String CommandLine, System.String Logfile, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars, AutomationTool.SpewFilterCallbackType SpewFilterCallback) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunAndLog (AutomationTool.CommandEnvironment Env, System.String App, System.String CommandLine, System.String LogName, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars, AutomationTool.SpewFilterCallbackType SpewFilterCallback)
 [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, System.String CommandLine, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.CommandUtils.RunUBT (AutomationTool.CommandEnvironment Env, System.String UBTExecutable, UnrealBuildTool.FileReference Project, System.String Target, System.String Platform, System.String Config, System.String AdditionalArgs, System.String LogName, System.Collections.Generic.Dictionary`2 EnvVars) [0x0
0000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.UE4Build.BuildWithUBT (System.String TargetName, UnrealTargetPlatform TargetPlatform, System.String Config, UnrealBuildTool.FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, System.String InAddArgs, Boolean Fo
rceUnity, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.UE4Build.Build (AutomationTool.BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, System.Collections.Generic.Dictionary`2 PlatformEnvVars, Nullab
le`1 InChangelistNumberOverride, System.Collections.Generic.Dictionary`2 InTargetToManifest) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at Project.Build (AutomationTool.BuildCommand Command, AutomationTool.ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at BuildCookRun.ExecuteBuild () [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.BuildCommand.Execute () [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Automation.Execute (System.Collections.Generic.List`1 CommandsToExecute, Tools.DotNETCommon.CaselessDictionary.CaselessDictionary`1 Commands) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Automation.Process (System.String] Arguments) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Program.MainProc (System.Object Param) [0x00000] in &lt;filename unknown&gt;:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.InternalUtils.RunSingleInstance (System.Func`2 Main, System.Object Param) [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)):   at AutomationTool.Program.Main () [0x00000] in <filename unknown>:0 
UATHelper: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Android (All)): RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults:Error: Error Unknown Error

At platform Android sdk settings set SDK API LEVEL TO: to matchndk.

At Android settings set Minimum Version to 21 and Target SDK version to 23.

Delete intermediate, build, saved folders in the project directory, and binaries intermediate folders, in all the plugins directories.

Then generate visual studio solution open it and build with visual studio.

Then open the project with the editor and try to package for android.

You can try the 4.14 version of unreal.

Don’t forget, the first time you open your project, you have to manually enable plugins from the editor then restart and then package for android.

I tried everything, but I think it does not work with mac or when compiling with Xcode, but ill try, But I’ll keep trying to make it work, Thank you very much for answering :smiley:

You are welcome:)

I wish i had a mac, i could help you further.

Maybe someone else developing with Mac for Android and have used plugins in the past can help you.

Search at forums and answerhub, maybe there are posts about plugins on Mac.

Hey, someone managed to get this plugin working on newer versions of Unreal?

Unreal compiler is returning me those 3 errors:


c:\422projetcts	estefb\Plugins\FacebookSDK\Source\FacebookSDK\FacebookSDK.Build.cs(9,10) : error CS1729: 'UnrealBuildTool.ModuleRules' n?o cont?m um construtor que aceite 0 argumentos
c:\422projetcts	estefb\Plugins\FacebookSDK\Source\FacebookSDK\FacebookSDK.Build.cs(60,67) : error CS0122: 'UnrealBuildTool.BuildConfiguration' ? inacess?vel devido ao seu n?vel de prote??o
c:\422projetcts	estefb\Plugins\FacebookSDK\Source\FacebookSDK\FacebookSDK.Build.cs(61,5) : warning CS0618: 'UnrealBuildTool.ModuleRules.ReceiptPropertyList.Add(UnrealBuildTool.ReceiptProperty)' ? obsoleto: 'Constructing a ReceiptProperty object is deprecated. Call ReceiptProperties.Add() with the path to the file to stage.'

Hello guys, I’ve PM the OP and he helped me to solve it! So, here’s the solution:

On FacebookSDK.Build.cs file you have to swap those 3 lines to work:


   FacebookSDK(TargetInfo Target)   to  FacebookSDK(ReadOnlyTargetRules Target) : base(Target)    AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "FacebookSDK_APL.xml"))   to  AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "FacebookSDK_APL.xml"));      string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);  to  string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);

And it’s done! The plugin can compile on newer versions of Unreal. Hope it helps. Bye bye.

Hello, I have tried using this plugin, but if I put it in my engine, I keep getting errors while trying to build for android:
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1a,ETC1)): Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:633: error: cannot find symbol

Hello! I was having errors with this plugin on UE4.22

Makis got helped me to fix them. You should edit FacebookSDK.Build.cs file as said and rename all the png files (from *.9.png to *.png) inside Facebook-4.18.0.aar file (zip archive).

There are fixed plugin files. https://yadi.sk/d/te9pWusYTFj81Q

Hey @. I’m currently using your fixed plugin version and have been checking the facebookSDK.Build.cs, in it, has looked like @ said. but when I try to package it to android (ETC1), I got some error like this

UATHelper: Packaging (Android (ETC1)): Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:977: error: cannot find symbol
UATHelper: Packaging (Android (ETC1)): ERROR: cmd.exe failed with args /c “C:\Projects \ue\Intermediate\Android\APK\gradle\rungradle.bat” :app:assembleRelease
PackagingResults: Error: Unknown Error

am I missing something here?

(unreal version 4.23.1)
(min SDK 28, target SDK 28)
(SDK API level “latest”, NDK API level “android-19”)

any news on this? I fixed everything but it comes to this error when launching

For version UE4 24.4 doesn’t work, Unreal suggests to rebuild the project, but in the end nothing comes out

I am experiencing the same problems. Someone was able to get it to work for this version?

How to use the plugin

Hi, Is it working ?

I need to login with facebook in my android game, get the friend’s list and profile pictures in the main menu. if somebody has got such functionality please help i’m stuck here.

Thanks in advance.