• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Facebook extension

K

kwlee

Guest
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.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
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!
 

pipebkOT

Member
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 ;)
 

Speederman

Member
I've updated the article with a link to the PDF manual too. :)
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:

rIKmAN

Member
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 (I haven't tried it on iOS yet, but this works for the Android export). I have wasted all the morning to figure it out...

Please, fix it (and also the included PDF in the extension)...
You need to report this officially as a bug and choose "Documentation" as the category.

In the IDE use Help > File a Bug Report.
 

Speederman

Member
You need to report this officially as a bug and choose "Documentation" as the category.

In the IDE use Help > File a Bug Report.
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:
C

Christian Rabuñal

Guest
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)...
Could you write the code please? I have the same problem
 
C

Cogollo

Guest
The documentation has already been fixed. You can check it here: https://help.yoyogames.com/hc/en-us/articles/360004488072.
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 by a moderator:

Speederman

Member
I need ds_list or ds_map in the last code? I'm confused
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.
 
C

Cogollo

Guest
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.
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.
 

Mert

Member
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.
 
Top