OK, I finally found the problem with Facebook and Android.
[lua]-- Works on iPhone and Android.
facebook.request(“me”)
– Works on iPhone. Fails on Android.
facebook.request(“me?fields=id,name,first_name,gender”)[/lua]
From what I can understand, adding the “fields” parameter causes the Facebook request to fail on Android.
Then I tried adding the access token manually, and then I got the following error message:
[lua]facebook.request(“me?fields=id,name,first_name,gender&access_token=”…event.token)
– {“message”:“Malformed access token BAAEMi9…?access_token=BAAEMi9…”,
– “type”:“OAuthException”,
– “code”:190}[/lua]
Notice that Facebook complains that the access token is $TOKEN?access\_token=$TOKEN
. Could this be a revelation of the problem? That Corona somehow makes an error in generating the URL it sends to Facebook? That would explain the initial “2500” error too.
My suspicion is that Corona simply adds access\_token=$TOKEN
to the URL prefixed by a ?
rather than a &
. It makes sense:
[lua]“me” – becomes “me?access_token=$TOKEN”
“me?fields=id” – becomes “me?fields=id?access_token=$TOKEN”
“me?fields=id&access_token=$TOKEN” – becomes “me?fields=id&access_token=$TOKEN?access_token=$TOKEN”[/lua]
I hope someone technical at Corona can take a look at this as soon as possible, as I need to specify the fields parameter. [import]uid: 73434 topic_id: 34494 reply_id: 138715[/import]