Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17076

[SDKBOX - Facebook] Share image is not working!

$
0
0

@ptk_mine wrote:

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!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>