I used cocos2d-js 3.8.1. My code uses to share an image below:
var btnShareLink = new cc.MenuItemFont(“Share Photo”, function(){
cc.log(’===== share photo ====’);
var info = new Object();
info.type = “photo”;
info.title = “My Photo”;
info.image = “res/twitter2.png”;
sdkbox.PluginFacebook.dialog(info);
}, this);
Everytimes i run this code, i got error
BitmapFactory(32315): Unable to decode stream: java.io.FileNotFoundException: res/twitter2.png: open failed: ENOENT (No such file or directory).
My image i put it on ProjectName/assets/res/twitter2.png.
So i want to khow that this code "info.image = “res/twitter2.png” is correct. Thank you very much!