facebook_dialog() question

J

James Lpz

Guest
Hi guys, I just can't figure this out.

I am trying to post something on the wall of facebook. Here is what I did.

Code:
wallPostMap = ds_map_create(); //create the ds_map that stores all the information
ds_map_add(wallPostMap, "picture","http://i280.photobucket.com/albums/kk162/James_Lpz_Bnrstro/screen_zpsxlshxcvc.png"); //the picture displayed by the post
ds_map_add(wallPostMap, "link", "https://play.google.com/store/apps/details?id=com.numbigames.VPM"); //the link the post will lead to
ds_map_add(wallPostMap, "name", "Check out my Virtual Monster " + string(name) + "! It is level " + string(stage) + " and has won " + string(battles_won) + " battles!"); //the title of the post
ds_map_add(wallPostMap, "caption", "Raise your own virtual monster!"); //the caption on the bottom of the post
ds_map_add(wallPostMap, "description", "Check out my pet monster"); //the main text of the post
facebook_dialog("feed", wallPostMap, -1); //open up the facebook dialog that requests the user to make the post
ds_map_destroy(wallPostMap); //destroy the wallPostMap, since it is no longer needed
I works correctly, no problems here. But what I am really trying to do is take a screenshot from the current game and post that to facebook.

So, first I create a screenshot

Code:
screen_save("screen.png");
Then I execute this code

Code:
wallPostMap = ds_map_create(); //create the ds_map that stores all the information
ds_map_add(wallPostMap, "picture","screen.png"); //the picture displayed by the post
ds_map_add(wallPostMap, "link", "https://play.google.com/store/apps/details?id=com.numbigames.VPM"); //the link the post will lead to
ds_map_add(wallPostMap, "name", "Check out my Virtual Monster " + string(name) + "! It is level " + string(stage) + " and has won " + string(battles_won) + " battles!"); //the title of the post
ds_map_add(wallPostMap, "caption", "Raise your own virtual monster!"); //the caption on the bottom of the post
ds_map_add(wallPostMap, "description", "Check out my pet monster"); //the main text of the post
facebook_dialog("feed", wallPostMap, -1); //open up the facebook dialog that requests the user to make the post
ds_map_destroy(wallPostMap); //destroy the wallPostMap, since it is no longer needed
It does post but the picture field is just blank...

Has anyone done something like this? Instead of using a link for the "picture" field, use an in-game screenshot?
 

jo-thijs

Member
I think the picture URL needs to be an actual online URL.
Otherwise, you can try giving the full path name to the screenshot.
 
J

James Lpz

Guest
I think the picture URL needs to be an actual online URL.
Otherwise, you can try giving the full path name to the screenshot.
I have tried giving the path name like this:
Code:
ds_map_add(wallPostMap,"picture",working_directory + "screen.png");
Is that how you give the FULL path?

(Did not work either this way..)
 

jo-thijs

Member
Does it work when you use the URL of a random image on the internet?
Does it work with a random image on your computer (not related to the game)?
 
J

James Lpz

Guest
It does work if I use a URL of a random image on the internet.

Let me try to see if it works with a random picture in my device, not related to the game.

I'll get back to you with the resutls
 
Top