I'm afraid I'm still running into troubles. Here's my function call for Facebook sharing:
function ShareToFB()
ShareTrigger = 1
ShareImg$ = "http://www.malevolencegame.com/FluffyKnuckleduster/IMAGES/Promo" + str(Random(1, 9)) + ".jpg"
ShareMsg$ = "I got a score of " + str(Player.Score) + "!"
FacebookSetup("[my app id]") `Censored for obvious reasons
FacebookLogin()
while GetFacebookLoggedIn() = 0
if (GetFacebookLoggedIn() = 1) then exit
Sync()
endwhile
if (GetFacebookLoggedIn() = 1)
if (left(getDeviceName(),3) = "ios")
FacebookPostOnMyWall ( "http://fluffyknuckleduster.com", ShareImg$, "I've been playing 'Wizzed Off!'", "Get it now on Google Play", ShareMsg$ )
endif
if (left(getDeviceName(),7) = "android")
FacebookPostOnMyWall ( "https://play.google.com/store/apps/details?id=com.FluffyKnuckleduster.WizzedOff", ShareImg$, "I've been playing 'Wizzed Off!'", "Get it now on Google Play", ShareMsg$ )
endif
while GetFacebookLoggedIn() = 1
if (GetResumed() = 1) then exit
Sync()
endwhile
endif
endfunction
When I call this function, the login process happens quickly (shown in the app by the screen going dark and a little loading spinner pop up) and then the game goes back to normal, as if nothing happened. THEN, once I wait 3 or 4 seconds, the Facebook share dialog comes up and it works fine. The only problem with this is, players are probably going to start tapping the share button again during that 3-4 second gap... This then makes the share dialog come up multiple times...
Is there a way to recognise that the Facebook share dialog is still loading in the background? GetResumed doesn't seem to be identifying it correctly...