How to Upload photo on Facebook with sdkbox and Cocos2dx v3.5 ? Help me!

Hi all,

i installed successful sdkbox plugin facebook and share link facebook (url, title, link picture), But i don’t upload screenshot on facebook, i can use link image only,

Can you help me share link facebook include screenshot, please ?

	sdkbox::PluginFacebook::init();
	sdkbox::PluginFacebook::login();

		
	sdkbox::PluginFacebook::requestReadPermissions({FB_PERM_READ_PUBLIC_PROFILE,       FB_PERM_READ_USER_FRIENDS});
	sdkbox::PluginFacebook::requestPublishPermissions({FB_PERM_PUBLISH_POST});
	
sdkbox::FBShareInfo info;
info.type  = FB_LINK;
info.link  = "http://www.cocos2d-x.org";
info.title = "cocos2d-x";
info.text  = "Best Game Engine";
info.image = "https://www.google.com/images/nav_logo225.png";
sdkbox::PluginFacebook::dialog(info);

thanks everyone !

Have you setup a Facebook TEST APP?

iOS or Android?

1 Like

i did setup, i use android, but i can’t upload screenshot on facebook with sdkbox c++

But did you:

  • register to become a Facebook developer
  • create an app
  • create a test version of that app

http://blog.cocos2d-x.org/2015/08/getting-started-with-the-sdkbox-facebook-plugin/

and

http://sdkbox-doc.github.io/en/plugins/facebook/v3-cpp/

i made it, but how to upload screenshot when just post link picture ?

info.image = “https://www.google.com/images/nav_logo225.png”;

i want uploap screenshot, such as C:\game\screenshot.png

Alright, please read this: http://sdkbox-doc.github.io/en/plugins/facebook/v3-cpp/

Your question is specifically answered in this document. Exactly answered for that matter. :smile:

You can check out this sample project, it contains exactly the functionality you want.
https://github.com/darkdukey/sdkbox-facebook-sample

1 Like