So I've investigated this further and found that it's not a Facebook problem. Though GetFacebookLoggedIn() does return 1 when it shouldn't.
The issue is with the following piece of code. It just causes a crash with no errors. I've managed to trace it to the HTTPEncode() function.
// Project: debug.agc
// Created: 2017-01-10
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "debug.agc" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
Type type_facebook
access_token as string
App_token as string
EndType
Global fbfunction as type_facebook
fbfunction.access_token = "EAAMgUwQHvZBMBAMuv3KTQLuELjQZANwM7SoKOZC6RuKzwFimhJQ3PnVm6QNDepIv7AJZBUdAXcLBReWsiI5Vm6Ww8EqBHwbTfaMx6FLMFUEjvAXU0QXWvwfZA8Pj3EjZBHsuR4SQNiRfWkECZCIOAeV6oR9eO9U5tSkh78XItagTAHTn5rK16uO"
fbfunction.App_token = "125831857919184"
result$ = NetGetString ( "graph.facebook.com", "/debug_token?input_token="+ fbfunction.access_token+"&&access_token="+HTTPEncode(fbfunction.App_token), 1 )
do
Print( ScreenFPS() )
Sync()
loop
//
//
//
Function NetGetString (url as string, data as string, secure as integer)
http = CreateHTTPConnection()
SetHTTPHost( http,url, secure )
//vardebugtext ( fbfunction.userID )
SendHTTPRequestASync( http, data)
while GetHTTPResponseReady(http) = 0
Sync()
endwhile
return$ = ( GetHTTPResponse( http))
CloseHTTPConnection(http)
DeleteHTTPConnection(http)
EndFunction return$