This is the code of my FB.cs file which is a by default code from unity fb sdk. If you see at line number 10 I have already marked frictionless request as true by default by removing the variable and just putting the value as true.
private static bool frictionlessRequests=true;
public static void Init(InitDelegate onInitComplete, HideUnityDelegate onHideUnity = null, string authResponse = null)
{
Init(
onInitComplete,
FBSettings.AppId,
FBSettings.Cookie,
FBSettings.Logging,
FBSettings.Status,
FBSettings.Xfbml,
true,//FBSettings.FrictionlessRequests,
onHideUnity,
authResponse);
}
/**
* If you need a more programmatic way to set the facebook app id and other setting call this function.
* Useful for a build pipeline that requires no human input.
*/
public static void Init(
InitDelegate onInitComplete,
string appId,
bool cookie = true,
bool logging = true,
bool status = true,
bool xfbml = false,
bool frictionlessRequests = true,
HideUnityDelegate onHideUnity = null,
string authResponse = null)
{
FB.appId = appId;
FB.cookie = cookie;
FB.logging = logging;
FB.status = status;
FB.xfbml = xfbml;
FB.frictionlessRequests = frictionlessRequests;
FB.authResponse = authResponse;
FB.OnInitComplete = onInitComplete;
FB.OnHideUnity = onHideUnity;
if (!isInitCalled)
{
FbDebug.Info(String.Format("Using SDK {0}, Build {1}", FBBuildVersionAttribute.SDKVersion, FBBuildVersionAttribute.GetBuildVersionOfType(typeof(IFacebook))));
#if UNITY_EDITOR
FBComponentFactory.GetComponent<EditorFacebookLoader>();
#elif UNITY_WEBPLAYER
FBComponentFactory.GetComponent<CanvasFacebookLoader>();
#elif UNITY_IOS
FBComponentFactory.GetComponent<IOSFacebookLoader>();
#elif UNITY_ANDROID
FBComponentFactory.GetComponent<AndroidFacebookLoader>();
#else
throw new NotImplementedException("Facebook API does not yet support this platform");
#endif
isInitCalled = true;
return;
}
No I am calling Init using this.
FB.Init(OnInitComplete, OnHideUnity,null);
And I then when I try to send request using this code
public static function SendLifeBack(){
FB.AppRequest
(
"Enjoy a free Potion",
["USER_ID"],
null,
null,
null,
"life",
"Free Life",
LogCallback
);
}
There is not sign of frictionless request as there is no checkbox of "don't ask me again before sending requests to this user" Even if I make the line number 10 as default as
FBSettings.FrictionlessRequests
even then it is not working. I have checked the frictionless checkbox in FBSettings too.