If you had to enter your email address and password for Facebook login AND you have the Facebook app on your device then something is wrong. It is most likely your setup with Facebook.com app page.
The code I use in AppGameKit isn't far off from yours, but you have to wait until GetFacebookLoggedIn() returns a 1 before moving on to posting to wall.
loggedIn = GetFacebookLoggedIn()
if loggedIn = 0
Facebooklogin()
repeat
loggedIn = GetFacebookLoggedIn()
FastSync()
until loggedIn <> 0 or GetPointerPressed() = 1 or GetRawKeyPressed(27) = 1
endif
link$ = "http://www.naplandgames.com/getshapetime.php?ref=1"
pic$ = "http://www.naplandgames.com/shapetime/assets/icon512.png"
name$ = "Shape Time!"
desc$ = "Four shapes. Four colors. How many can you catch?"
caption$ = "Play Shape Time! on Android or iOS"
if loggedIn = 1
FacebookPostOnMyWall ( link$ , pic$ , name$ , caption$ , desc$ )
//above method requires app approval - only works if user has FB app installed
else
//if the user cancels login
postByWeb = ConfirmUI("Shape Time! couldn't connect with Facebook. Would you like to post with your browser instead?" , "Yes" , "No, thanks.")
if postByWeb = 1
//below method requires login to FB via browser if not already done
url$ = "https://www.facebook.com/dialog/feed?"
url$ = url$ + "app_id=1375030476113709"
url$ = url$ + "&display=popup&caption=" + HTTPEncode(caption$)
url$ = url$ + "&link=" + link$
url$ = url$ + "&redirect_uri=" + "http://www.naplandgames.com/shapetime"
url$ = url$ + "&picture=" + pic$
url$ = url$ + "&name=" + HTTPEncode(name$)
url$ = url$ + "&description=" + HTTPEncode(desc$)
OpenBrowser(url$)
endif
endif
Here's some screenshots of how it should be set up on FB
A very important part is to make sure that you have your key hash correct.
There is one key hash that you'll have when you haven't used a keystore to sign the app.
And there is another for your actual production keystore.
Getting the keystore can be a pain, but it works.
Also sometimes FB needs a little time to propagate the info for your app to servers.