Facebook extension

Discussion in 'GameMaker Studio 2 Community Tech Support' started by kwlee, Apr 5, 2019.

  1. kwlee

    kwlee Member

    Joined:
    Jan 21, 2018
    Posts:
    2
    Yoyogames docs states the following: The following section refers to obsolete functions that were only valid for the old GameMaker: Studio 1.4 legacy Facebook extension. As such you can no longer use these functions in your projects. For current Facebook functionality you need to have activated the Facebook API in the appropriate Game Options for the target platform, which will prompt you to download and install the extension. The extension comes with a *.pdf format mini-manual explaining how to use it as well as showing all the function definitions and examples. All references to the old facebook_*() functions will need to be replaced (and updated) to use the extension fb_*() equivalents.

    I did the above and it prompted me to download Facebook Extension for GM 1.4 (nothing on 2.0). Couldn't find any pdf. When build it just throws a list of errors like the following
    Script: Firebase_Facebook_signIn at line 6 : unknown function or script facebook_login

    Same result even if I tried with fb_login.

    Am I missing something or this is a GM2 bug?

    Btw, I am running GM 2.2.2.413

    Kindly advise. Thanks.
     
  2. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,901
    It looks like the updated extension hasn't been published correctly. I'll chase it up and see what can be done to fix this as soon as possible. Thanks for pointing it out!
     
  3. Jack S

    Jack S Member

    Joined:
    Jul 21, 2016
    Posts:
    63
    Nocturne likes this.
  4. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,901
    I completly forgot the Beta version of the extension was linked on the helpdesk! I've updated the article with a link to the PDF manual too. :)
     
    Jack S likes this.
  5. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    210
    but......but, the demo version already included the pdf manual :D is in the "included files" of the project, but if you import the extension to your own project of course that the pdf will not be carried over to your project, but is still in the facebook extension project ;)
     
    Nocturne likes this.
  6. Speederman

    Speederman Member

    Joined:
    Jun 23, 2016
    Posts:
    46
    For your info: fb_graph_request needs a DSList with key-value pairs as the last parameter instead of the DSMap that the documentation says (on both iOS and Android exports). I have wasted all the morning to figure it out...

    Please, fix it (and also the included PDF in the extension)...
     
    Last edited: Jun 12, 2019
    Christian Rabuñal likes this.
  7. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,526
    You need to report this officially as a bug and choose "Documentation" as the category.

    In the IDE use Help > File a Bug Report.
     
  8. Speederman

    Speederman Member

    Joined:
    Jun 23, 2016
    Posts:
    46
    Well, it is not a Game Maker's documentation issue, as it is on the pdf included into the facebook extension (and here). I thought that it would be easier and faster to let Nocturne know it.

    Anyway, I'll also do what you suggest... Thanks.
     
    Last edited: Oct 16, 2019 at 12:18 PM
  9. Christian Rabuñal

    Christian Rabuñal Member

    Joined:
    Wednesday
    Posts:
    1
    Could you write the code please? I have the same problem
     
  10. Speederman

    Speederman Member

    Joined:
    Jun 23, 2016
    Posts:
    46
  11. Cogollo

    Cogollo Member

    Joined:
    Jun 24, 2018
    Posts:
    3
    Yes bro, i check that link but when i put

    Code:
    var _l = ds_list_create("fields", "id,name,picture");
    fb_graph_request("me", "GET", _l);
    ds_list_destroy(_l);
    it gives me error.

    I try:

    Code:
    var _l = ds_list_create();
    ds_list_add(_l,"id,name")
    //fb_graph_request("me/permissions", "GET", _l);
    fb_graph_request("me", "GET", _l);
    ds_list_destroy(_l);
    but it does not work

    My question is, that code where i put, in what event? Async Social from control object?
     
    Last edited: Oct 17, 2019 at 12:43 AM
  12. Cogollo

    Cogollo Member

    Joined:
    Jun 24, 2018
    Posts:
    3
    I need ds_list or ds_map in the last code? I'm confused
     
  13. Speederman

    Speederman Member

    Joined:
    Jun 23, 2016
    Posts:
    46
    Well, I've just seen that ds_list_create() is used in a wrong way in the documentation. You can't add values to a list with that function. This is how it should be done:
    Code:
    var _l = ds_list_create();
    ds_list_add(_l, "fields", "id,name,picture");
    fb_graph_request("me", "GET", _l);
    ds_list_destroy(_l);
    This is the code you need to request the data, which will be received on the Async Social event.
     
    Cogollo likes this.
  14. Cogollo

    Cogollo Member

    Joined:
    Jun 24, 2018
    Posts:
    3
    Thank you very much brother! Was what I needed to get what I was looking for. Obviously there is an error in the documentation, I have not been able to solve it for 3 days until I met you.
     
  15. Speederman

    Speederman Member

    Joined:
    Jun 23, 2016
    Posts:
    46
    You're welcome.

    I've contacted Yoyo staff and they have already fixed the documentation, so everything is fine now...
     
  16. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    389
    I am writing a wrapper extension for the main Facebook extension, which allow users to fetch Facebook data easily and really don't mess with the hard parts of dealing with the extension.

    I'm planning to release the extension in couple days.
     
    rIKmAN likes this.

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