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

iOS Facebook issues

W

Wal

Guest
Hello all ! First post in this new forum it feels good that it's up and running .

I'm having a hard time making Facebook run with my game so some help would be much appreciated !

Scenario here is user have the Facebook app on the mobile ( if he doesn't a web page has to open but I have no clue how to do this yet ...)

I want the user to :

- login to Facebook ( user presses a Button to Log in that appears ONLY if he's not logged in already )
-post a wallpost

That's it really . I created 2 buttons , not sure if I can have only one performing the 2 actions ? ( Log in then wallpost )

When I press the Log in button , I can see in Xcode log that status is Authorized but at no moment the game takes me to the Facebook Log in page to enter my infos . Actually it happened one time and since never happened again .

Also , when I press the Wallpost button , the game crashes ( on iOS didn't try on Android ) :

Xcode log shows a problem with the first key-value pair that keeps on repeating :

Found key-value pair name-My Game High Score


I'll be happy to give you my code and the logs if this is not clear yet .


Thanks a lot for the help !
 
W

Wal

Guest
Hey guys ,

Still struggling with Facebook ... It's sooo annoying really . It's been more than a month actually and can't find a solution . Only thing left to do in the game ...
Putting my code will be clearer .
I combined Facebook Log in button with the Facebook Wallpost button .

I encounter 2 problems : Facebook Status shows it s Authorized BUT no log in page comes on screen ( before or after status being Authorized )
Game crashes because Xcode runtime gets stuck at ds_map_add(wallPostMap, "name", "My Game High Score"); : the 1st key-value pair

Thanks a lot !

///Code

Facebook log in + wallpost button :

create event

pressed = 0;
caption = "Play My Game on Android or iOS now!";
left pressed

if (pressed = 0)
{
if (os_is_network_connected())
{
facebook_init();
global.Auth = false;
global.AskedForLogin = false;
permissions = ds_list_create();
ds_list_add(permissions,"public_profile", "user_friends", "user_games_activity");
facebook_login(permissions,fb_login_default);
//facebook_login(permissions,fb_login_fallback_to_webview);
alarm[0] = 1;
}
pressed = 1;
alarm[2] = room_speed*10;
}
alarm [0]

var fbStatus;
fbStatus = facebook_status();
show_debug_message( "Facebook status: " + fbStatus);

draw = true ;

switch (fbStatus)
{
case "AUTHORISED": global.Auth = true;

var text = "I scored " + " points in My Game" + "! Can you beat it?" ; //add global.highscore

if (global.Auth)
{
wallPostMap = ds_map_create();

ds_map_add(wallPostMap, "name", "My Game High Score");
ds_map_add(wallPostMap, "caption", string(caption));
ds_map_add(wallPostMap, "description", string(text));

facebook_graph_request("me/feed","POST",wallPostMap,-1);
ds_map_destroy(wallPostMap);
}
instance_destroy();
break;

case "IDLE": facebook_login(permissions, fb_login_default);
//facebook_login(permissions,fb_login_fallback_to_webview);
global.AskedForLogin = true;
alarm[0] = 30;
break;

case "FAILED": facebook_login(permissions, fb_login_default);
//facebook_login(permissions,fb_login_fallback_to_webview);
global.AskedForLogin = true;
alarm[0] = 30;
break;

case "DENIED": if (!global.AskedForLogin)
{
facebook_login(permissions, fb_login_default);
//facebook_login(permissions,fb_login_fallback_to_webview);
global.AskedForLogin = true;
}
else
{
instance_destroy();
}

default: alarm[0] = 30;
break;
}
alarm[1]

pressed = 0;
 
Last edited by a moderator:
W

Wal

Guest
Just trying to revive this post ... Come on people , nobody successfully implemented Facebook ? I just want to log in and post a wallpost ! ( I read all the tutorials and demos yes )

Thx
 
S

Shihaisha

Guest
Come on people , nobody successfully implemented Facebook ?
Looks like not. Or maybe those people just don't want to share their secrets. But if you finally will manage to sort this out, maybe you can write a tutorial for the rest of us?
 
W

Wal

Guest
Thanks for the reply !

I'll try some of the Sharing stuff on the marketplace but they mostly use URLs for Facebook and you can't enter text before hand ( user has to do it ) . It's a way around I guess . But still a solution when facing a wall ...

Didn't find an example though maybe I haven't searched enough .

@ Shihaisha : if I succeed in making it work I'll definitely tell you guys how I did . Am not there yet :/ which is enraging as I followed YY's tutorials ... Probably incomplete and outdated .
 
K

kurtwaldo

Guest
Hey Wal! Just to let you know, you're not going crazy; I believe this is a bug in GM... >.< facebook_graph_request is broken on iOS, causing crashes. Super annoying!

Bug report is here...its been 5 months since this bug was reported...quite a shame!

http://bugs.yoyogames.com/view.php?id=20458
 
Last edited by a moderator:

Mert

Member
Hey Wal! Just to let you know, you're not going crazy; I believe this is a bug in GM... >.< facebook_graph_request is broken on iOS, causing crashes. Super annoying!

Bug report is here...its been 5 months since this bug was reported...quite a shame!

http://bugs.yoyogames.com/view.php?id=20458
I have an extension in market, easy facebook scores, which has exact problem. Graph request is broken on iOS; but works perfectly on Android devices.
https://marketplace.yoyogames.com/assets/2871/easy-facebook-scores

Edit : Saw your message on review. We need a fix :(
 
A

AndrewCampbell

Guest
This is still broken more than a year later.
@Nocturne do you know of a timeline for this bug fix? IOS app is still crashing due to this issue.
 
Top