Android facebook dialog share error

Hello. I can’t use share dialog on facebook plugin.
Some times ago - in february, all works fine.
When you plan upgrade facebook sdk to newer version?
Thank you!

i’ll test it today. thanks for your report.

I test with dialog link / photo on Android , it works . Example:

but the post id is null.

would you plz post your logcat ?

I can’t run sdkbox-sample-facebook, because new Android Sdk can’t compile with ant.
I create new cocos 3.16 project, import sdkbox facebook version, after copy src from sdkbox-sample-facebook and place my facebook staging app id.

inviteFriendsWithInviteIds works with [’’], with [] not works.

Dialog Link - no action, only share failed in logs. no error messages.
Logcat between start dialog and error message - (2.4 KB)

Language of our project is JS

this feature have been deprecated by facebook.

Now i test different version of sdkbox - no effect.

After remove facebook app from phone, i can make share.
May be problem in communication with facebook app.

I tested with facebook lite app on android device.

UP: I reproduce with facebook app on android device.

Ok. Thank you!
I tested with facebook lite app - share dialog works.
Without any facebook app - works.
With facebook app - not works.

I try use the same facebook and cocos 3.16
In my previous project version share picture button was working fine. It used
PluginFacebook::requestPublishPermissions({ FB_PERM_PUBLISH_POST });

Now it is not working; Facebook says: “As of April 24,2018, the pubish_actions permission has been removed … use our Sharing products instead.”

Q1: should I update something in my code?
It uses about the same code as in your mentioned sdkbox-sample-facebook.

Q2: what new permissions should I request (via review?) in Facebook developer Submit Items for Approval ?
(publish_pages or publish_to_groups ?)

##FB onSharedFailed:{“message”:"(#200) Requires either publish_to_groups permission and app being installed in the group, or manage_pages and publish_pages as an admin with sufficient administrative permission",“code”:8}

  1. publish_to_groups permission
  2. MUST submit a new App Review request


1 Like

I’ve returned to that my problem:
In PluginFacebook.h I do not see manage_pages and publish_pages, (but there are):

const std::string FB_PERM_PUBLISH_POST("publish_actions");

Also they are not presented in PluginFacebook.h in sdkbox-facebook_v2.4.0.3 and latest v2.4.1.1

I’ve hardcoded manage_pages and publish_pages permissions. My app (debug version with test_Facebook_ID) asks for them and gets them (checked with PluginFacebook::getPermissionList() ). But then in my app I call the chain (as in sdkbox-sample-facebook ):
utils::onCaptureScreen() -> afterCaptureScreen() -> onSharePhoto() -> PluginFacebook::share()

– I get onSharedFailed() error message:

##FB onSharedFailed:{FacebookGraphResponseException: (#200) Requires extended permission: publish_actions httpResponseCode: 403, facebookErrorCode: 200, facebookErrorType: OAuthException, message: (#200) Requires extended permission: publish_actions}

I’ve deleted FB test account and reinstalled the app - same result.

I’ve build and tested it with sdkbox v2.4.0.0 and then with latest v2.4.1.1 - same result.

On the same device (Android 4.4.2) I can post a picture in FB.

The same error, then I cleaned FB data and changed permission to publish_to_groups

Aha, it works via
onDialogPhoto(); // onSharePhoto();
(it calls then)

As I get (after very long struggle), indie developers (who has no Business / Company on Facebook) can publish (make a post) with PluginFacebook::dialog(info); without getting manage_pages and publish_pages permissions.

1 Like

Share Dialog
The Share Dialog is an easy way to let people share content without requiring them to log into your app or grant any permissions. It works on Web, Android, and iOS.

I find the document, and I will update the Facebook plugin.

Thanks serpri,

1 Like