Facebook plugin - error "Share failed, dialog not supported: feed_dialog"

I am trying the samples from

http://www.cocos2d-x.org/wiki/Facebook_API_Reference_for_Cocos2d-x_and_Cocos2d-x-lua

Doing this code taken from the plugin samples:

FacebookAgent::FBInfo params;
params.insert(std::make_pair("dialog", "share_link"));
params.insert(std::make_pair("link", "http://www.cocos2d-x.org"));
                
if (FacebookAgent::getInstance()->canPresentDialogWithParams(params))
 {
  FacebookAgent::getInstance()->dialog(params, [=](int ret ,std::string& msg)
    {
     CCLOG("%s", msg.c_str());
      });
    }
 else
   {
    params.insert(std::make_pair("dialog", "feed_dialog"));
   FacebookAgent::getInstance()->dialog(params, [=](int ret ,std::string& msg)
     {
       CCLOG("%s", msg.c_str());
        });
     }

I get the error

cocos2d: {“error_message”:“Share failed, dialog not supported: feed_dialog”}

Trying the sample HelloPlugins, all the share features return errors, below:

cocos2d: save image to /var/mobile/Containers/Data/Application/D891406E-6A9D-4962-BDD4-317692745C5E/Documents/facebookshare.jpg
cocos2d: Can’t open dialog for share_photo
cocos2d: {“error_message”:“Share failed, dialog not supported: share_link”}
cocos2d: Can’t open dialog for message_link
cocos2d: Can’t open dialog for message_open_graph

You get further them me, mine won’t even login :smile:

Did you change anything in the helloPlugins example (like the facebook ID) or did you run it as is?

You have to change some values in the HelloPlugins Info.plist file, as explained here

http://www.cocos2d-x.org/wiki/Facebook_integration_instruction_for_Cocos2d-x_and_Cocos2d-x-Lua_on_iOS

Before that, you have to make an application in Facebook

https://developers.facebook.com/docs/ios/getting-started/#appid

I am able to login, and get all the functions on the first part of the HelloPlugins sample, it’s just the share part I get the errors

That’s what I figured, you’re using your own app ID.
From what I read at facebook, you need to request a review from facebook to be able to do the extended permissions, like manage_pages and publish_actions.

But to be able to get facebook to review your request, you need to upload a version of your game to them.
That’s the part where I’m stuck at. First of all I’m not happy with having to send my app to facebook, as it’s not yet released (how safe is this?) and second, now I have to send in a version showing what I want to do, without being able to test what I want to do. Isn’t this like a chicken and egg problem?

Why won’t facebook let me test the functionality on my test build/test devices, and then have me submit the items for review when I’m done and before I release my app.

Does anyone have any experience with this?

Can you send the URL with this information?

For my case, I have an app published both in the iOS AppleStore and GooglePlay.
I just do not have a Facebook version of my game.

I was under the impression that this Cocos2d-x Facebook plugin is just to allow to post to a Facebook news feed directly from my game (either the IOS or Android version of it).

So, nothing related with having an actual Facebook version of the game. Am I wrong in this ?

Check out “Permissions That Require Review” on:
https://developers.facebook.com/docs/facebook-login/permissions/v2.0

And “Step 2: Select Items for Review” on:
https://developers.facebook.com/docs/apps/review/

But according to this: https://developers.facebook.com/docs/android/open-graph/

It literally says:
Publish Open Graph actions

Open Graph is a great way for apps to share rich stories through structured content. Open Graph actions help people tell richer stories by giving apps more control over the story being told and the language used to express the story in the news feed. Using the Share dialog makes that easier than ever for people. The Share dialog lets apps publish Open Graph actions without using Facebook Login and without having to ask people for a publish permission (e.g. publish_actions).

So… we should not need any special permissions.
If that is the case, then why does the hello plugins example keep giving error messages when trying to share something?

EDIT:
For the record, I’m using Facebook Android SDK 3.20 with Cocos2d-x v3.3rc0 and the HelloPlugin provided within. I’ve also set the plugin up in my own game, login/logout works, but any form of sharing fails, as the OP reported as well.

We would love some help from the team on this, did something break with the latest facebook sdk, or are we missing permissions?

I filled the items needed for a review of my app, it’s now in review by Facebook

https://developers.facebook.com/docs/apps/review/

the problem with some of the error messages seems to be that

bool status = agentManager->getSharePlugin()->callBoolFuncWithParam(“canPresentDialogWithParams”, &params,NULL);
        return status;

always returns false

So requesting the permissions didn’t fix the problems?
And how long did the facebook review take?
If you don’t know yet (because they’re still in review), could you post an update once you know more?
I’m sure it would be beneficial to others stumbling on this same issue.

And are you also working on the latest facebook sdk (3.20)?

I’m going to put the facebook functionality in my test app, and request the additional permissions for that app on facebook. That way I can use my test app ID to test projects in development, and switch to the correct ID once I’m ready(ish) to release my app.

I am waiting for review results, will post here.
I am not sure if the functionality I am using actually requires an app review, will have to double check that.

I am using the latest cocos2d-x from git (v3.3.rc1), that includes a Facebook SDK framework

I got the same error message “Share failed, dialog not supported”. Any success with this?

@Den
This thread has some updates on the error

Thank you, @PedroVicente. That helps. Do you know if it is possible to use dialogs without Facebook app install on target platform?

@Den

My understanding is that if you have the Facebook app installed on the device
this will be true

if (FacebookAgent::getInstance()->canPresentDialogWithParams(params))
{

otherwise the else code on the other thread will be true

However, for me, I have the Faceboop app, but the else is executed.

Regardless, some way to post will always happen with the code on that thread.

I would post the question on the other thread

@PedroVicente How did the review go, and is everything working now?

I canceled the review, it was not needed for the kind of permissions I requested.

Ok, so you got it all working in the end with the canvas? That’s great!

Did you add invite friends functionality to?
If so, could you share how you did it (it seems the way I try it “conflicts” with the present of the canvas (and lack of https web address).

I still have to figure out how to store credits and xp in facebook, and retrieve it for all friends to build my ranking. Bet I’m almost there… I can see light at the end of the tunnel :smile:

Any help would be greatly appreciated!

Kind regards,
Michaël