Facebook SDK 7.4.0 in Unity 5.3 Tutorial – Singletons, Inviting & Sharing
Home Forums Tutorial Support Facebook SDK 7.4.0 in Unity 5.3 Tutorial – Singletons, Inviting & Sharing
Tagged: unity
This topic contains 36 replies, has 28 voices, and was last updated by Jeniffer P 3 years, 11 months ago.
-
AuthorPosts
-
April 5, 2016 at 12:56 am #714
Hey I am facing a problem in building it for android, haven’t used Singletons but done all the other things. The error is :
UnityException: Build failure
Unable to merge android manifests. See the Console for more details. See the Console for details.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message)
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuildPointToConsole (System.String title, System.String message)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:177)
UnityEditor.HostView:OnGUI()Any help is highly appreciated !!
Cheers!
April 5, 2016 at 10:25 am #716i already implemented the social sharing app and it works on unity, but i already tried using an android emulator like Bluestack for example, if pressed login it wont redirect to an authorized info facebook. The login button on android apk just display a click login button. But on Unity, it can be redirected and saw profile name and profile pic invitation sharing and challenge
April 5, 2016 at 9:16 pm #717I am not able to build the apk for my unity project. when I build the project it shoots up the above mentioned error, unable to merger android manifest files.
I checked other places the error is produced when different manifest files(from different plugins) have different values for same variable, I am unable to make out which variable is creating this error for me. If you can figure it out ( seeing the above mentioned error ) would help a lot!!!April 6, 2016 at 3:05 am #718+Arpit Agarwal try deleting some Android Manifest code. Maybe you have more than one assets that contains an Android Manifest
April 7, 2016 at 11:19 pm #723when I press login button on a real android device, the dialog screen tries to load, but it doesn’t! why is that??
April 11, 2016 at 7:08 pm #729My problem was related to facebook filtering in Iran!
April 19, 2016 at 4:51 am #731Hi everyone , I’m a little problem when I try to test the application in my android . When I click the button to log on facebook, happens appears a white screen message ” Invalid Scope : Public” I am trying to find the solution but so far nothing . Does anyone know how to solve this problem ? I’m sorry for bad English.
Thanks 🙂
May 4, 2016 at 7:33 pm #735@Douglas Martins:
I guess it goes wrong in FBlogin(), since this is where you specify the scopes.
It should be:
permissions.Add("public_profile");
instead of just public.——————–
I also have a problem, hope someone can help 🙂
When I close the app and restart it, I have to press Login button again. Then it says I already gave permission.
Seems that when calling DealWithFBMenus(FB.IsLoggedIn) in Awake(), FB.IsLoggedIn is false.
It only gets true a few moments later.I’m currently keep checking if it turns true, and then auto login. But I’m sure this is the wrong way 🙂
Any tips?-
This reply was modified 4 years, 9 months ago by
MaxOnar.
May 15, 2016 at 12:19 am #737Many thanks for this great tutorial!
It worked perfectly for Android devices but when I tried to build for iOS, it failed to compile. I was only able to export it to XCode but when I tried to compile a lot of errors came out and the build failed. I thought it was the code so I tried building the basic examples that come with the FB SDK instead, but its the same case, build failed. I am using Unity 5.3 and FB SDK 7.4, I tried integrating FB SDK 7.5 but same scenario happens. The weird thing is, if I downgrade to FB SDK 7.3, it compiles perfectly on Xcode. Any ideas or similar issues? Have you tried building this example for iOS devices?May 20, 2016 at 4:39 am #738Hi and thank you. Share and everything works great . Thank you lots. But was wondering how I could share screenshot? Seems there every tutorial is different. And I barely know programming. Could you by any chance provide us with the code needed to share screenshot of the game? Thank you so much.
May 27, 2016 at 11:39 am #741Hello!
I have a issue about FB.AppRequest();
AppRequest(
string message,
OGActionType actionType,
string objectId,
IEnumerable<object> filters = null,
IEnumerable<string> excludeIds = null,
int? maxRecipients = null,
string data = “”,
string title = “”,
FacebookDelegate<IAppRequestResult> callback = null)
Now, I want to send scores to my facebook friends by AppRequest, but i can’t get the objectId , i don’t know it is what,can you help me?Thanks for your help.
June 15, 2016 at 11:14 am #752Hi. Where you mention NOT using the GetAppLink and instead just typing your app URL instead…… Do you still use the same code with th Getapplink part and just add the url string or is it diffrenent code? if possible can you put the coding here for me to copy in or have you shown it on your website? many thanks
June 15, 2016 at 5:29 pm #753At 28.36 on your video I enter the facebook token but I end up with this error
NullReference: Object Reference not set to an instance of an object FBscript.AuthCallBack (IResult result) (at Assets/FBscript.cs:41
when I click on the error it takes me Fbscript.cs and shows Line:
FacebookManager.Instance.IsLoggedIn = true;
please help everything was working up to that point
June 27, 2016 at 10:35 am #759Hey Glenn, im trying to get my game to work on Facebook, im using SDK 7.5, in the editor, i manually insert my user access token, click on “Send Success” and it works just fine. Now when i host it on a domain and tell Facebook to use the https that i have uploaded my game on, this is what i get http://imgur.com/hZYuy01
Im not sure what the problem is, ive exhausted myself attempting to get it to work, heres my script. Any help would be greatly appreciated 😉using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using Facebook.Unity;public class FBScript : MonoBehaviour {
private string canYouBeatScore;public string ProfileName { get; set; }
public bool IsLoggedIn { get; set; }
public Sprite ProfilePic { get; set; }
public ScoreManager theScoreManager;
public GameObject startButton;
public GameObject settingsButton;
public GameObject aboutButton;
public GameObject fbLoginButton;void Awake ()
{
if (!FB.IsInitialized) {
FB.Init (SetInit, OnHideUnity);
} else {
IsLoggedIn = FB.IsLoggedIn;
}
}void Start ()
{
canYouBeatScore = “Can you beat my score? I got ” + theScoreManager.hiScoreCount;}
void SetInit ()
{
if (FB.IsLoggedIn)
{
Debug.Log(“FB is logged in”);
}else
{
Debug.Log(“FB is not logged in”);
}DealWithFBMenus (FB.IsLoggedIn);
}void DealWithFBMenus (bool isLoggedIn){
if (isLoggedIn) {
startButton.SetActive (true);
settingsButton.SetActive (true);
aboutButton.SetActive (true);
fbLoginButton.SetActive (false);
} else {
startButton.SetActive (false);
settingsButton.SetActive (false);
aboutButton.SetActive (false);
fbLoginButton.SetActive (true);
}}
void OnHideUnity (bool isGameShown)
{
if (!isGameShown) {
Time.timeScale = 0;
}
else
{
Time.timeScale = 1;
}
}public void FBLogin()
{
List<string> permissions = new List<string> ();
permissions.Add (“public_profile”);FB.LogInWithReadPermissions (permissions, AuthCallBack);
}
public void Share()
{
FB.FeedShare (
string.Empty,
new Uri(“https://somethingsomethign”),
“stuff”,
“stuff”,
canYouBeatScore,
new Uri(“http://picture”),
string.Empty,
ShareCallback
);
}void ShareCallback(IResult result)
{
if (result.Cancelled) {
Debug.Log (“Share Cancelled”);
} else if (!string.IsNullOrEmpty (result.Error)) {
Debug.Log (“Error on share!”);
} else if (!string.IsNullOrEmpty (result.RawResult)) {
Debug.Log (“Success on share”);
}
}void AuthCallBack (IResult result)
{
if (result.Error != null)
{
Debug.Log (result.Error);
}
else
{
if (FB.IsLoggedIn){
Debug.Log(“FB is logged in”);
}else
{
Debug.Log(“FB is not logged in”);
}DealWithFBMenus (FB.IsLoggedIn);
}
}
}July 2, 2016 at 6:59 am #760Hi Glenn! Your tutorials look excellent and are well received. I’m going to go through them regardless, but first I wanted to know how useful this integration will be for purposes of an asynchronous turn based multiplayer game. For instance, will this work alongside a back end service like GameSparks or App42? Also will it be useful for cross platform play, such as one player on a Windows standalone build, and another playing on Android, or Android vs IOS, etc.? I’m only just starting to research these types of things, but I am very well versed with Unity singleplayer scripting, and basic Unity networking. Any help pointing me in the right direction would be greatly appreciated. And I’ll be sure to follow up after I go through your tutorials as well. Thanks!
-
This reply was modified 4 years, 9 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.