Facebook default login grants "publish_actions" permission problem...

Hello everyone,

I just want to ask you guys a quick question. If you want to skip the text you can go to the summary question section on the bottom. Below you will see my code about the Facebook share. If the user is logged in, I check if the user has the “publish_actions” permission. If I find this permission, I use FB.ShareLink and also write this permission on the screen.

What I do not understand is when I try it with my facebook account, and close all the platform connections and permission through settings, I still can share and can see the “publish_actions” permission on the screen. I know that sharelink does not require “publish_actions” permission but you can see that in the code I only share if the user grants this permission. It does not matter if I login before share or login while sharing.

And I also tried to Loginwithpublishpermissions first. When I do that facebbok just asks for permission for standart properties. Mybe it is because I need to send the app to facebook for review or not I dont know but this still does not explain everything. But this is a seperate issue I guess, probably it has something to do with coding or developer page or app review.

Summary question :

What I wonder is, how come I have the “publish_actions” permission even tough I make a default login and my app does not ask for a permission?

I am also Logging with publishpermissions If I can not find the permission in the token,too. But I am not sharing all the code to keep it short, actually I am just sharing the necessary main parts.

Thanks in advnace for your help, I really want to understand the reason behind this.

void Awake()
{
if (!FB.IsInitialized) {
FB.Init (InitCallback, OnHideUnity);

} else {
FB.ActivateApp ();
}
permissionTextObject = GameObject.FindObjectOfType ();
}

public void FaceLogin(){
FB.LogInWithPublishPermissions (new List(){“publish_actions”} , AuthCallback);

}
public void FaceShare(){
AccessToken aToken = Facebook.Unity.AccessToken.CurrentAccessToken;
foreach (string permission in aToken.Permissions) {
if (permission == “publish_actions”) {
FB.ShareLink(
new System.Uri(“https://google.com.tr”),
callback: ShareCallback
);
permissionTextObject.gameObject.GetComponent().text = permission;
publishPermission = true;
return;
}
}
}

Perhaps there’s an issue when you query the permissions from the token? I didn’t even know you could do it that way. On my device I have logged in with a single permission (public_profile) and when I do a graph request to query the permissions the only permission I have granted is public_profile.

Hello,
Thanks a lot for your reply. Are you using Graph API in your script to check the permissions? I also checked the Graph Explorer in developers page and there is no publish permission. But as you saw in my above code, I can not do any sharing if the permission was not granted. But by default this publish permission is not granted to the application. But also I could not find anything wrong with the code.

Basically facebook and graph API says that I did not grant the permission but when I execute the above code it Works anyway.
I do not know maybe it is best to let it go. All in all I understood how this thing works and I can do what I needi I think that is what should count :).

No I don’t actually check the permissions, it was just a test.

Why are you checking permissions anyway before calling ShareLink?

Well I just tried to test and learn something for the future if I need publish-actions permission :).