Z
Ziphold
Guest
Just a quick question. I often work with functions like http_get and http_post_string which send data to a certain web location and get the response. This response can be fetched in the http event.
So, for example, if I post arguments to a data location:
I can then fetch the result in the http event using:
As soon as the response comes, http event is started and the appropriate function is executed.
Now, the facebook extension also has an option of sending a request to retrieve user data, for example, profile photo in this case. So If I send the request using facebook_graph_request:
How do I know when the facebook response arrived? Can I also expect in in the http event? Because I tried slamming some things together and It didn't work as expected.
Any ideas? In advance, thank you.
So, for example, if I post arguments to a data location:
Code:
register_status=http_post_string("http://ftp.example.org/example/register.php", args);
Code:
if ds_map_find_value(async_load, "id") == register_status {
if ds_map_find_value(async_load, "status") == 0 {
register_status_string = string(ds_map_find_value(async_load, "result"));
do stuff
}
}
Now, the facebook extension also has an option of sending a request to retrieve user data, for example, profile photo in this case. So If I send the request using facebook_graph_request:
Code:
var pm = ds_map_create();
ds_map_add(pm,"fields","picture"); ///Successfully grabs the photo.... in 50x50
facebook_graph_request("me","GET",pm,photo_status);
ds_map_destroy(pm);
Any ideas? In advance, thank you.