Question about facebook_graph_request

Discussion in 'Programming' started by Ziphold, Oct 10, 2017.

  1. Ziphold

    Ziphold Member

    Jun 22, 2016
    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:
    register_status=http_post_string("", args);
    I can then fetch the result in the http event using:
    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
    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:
    var pm = ds_map_create();
    ds_map_add(pm,"fields","picture"); ///Successfully grabs the photo.... in 50x50
    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.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice