javascript - Trigger.IO Facebook Authorize Not Opening Login Page -
tl;dr;
issue 1: ios simulator hang when trying facebook.authorize. safari open facebook mobile url, page not render.
solution 1: mis-spelled permission (publish_actions). make sure permissions , audience spelled properly.
issue 2: ios simulator (7.0.3) complete facebook.authorize process, same code on iphone 5 (7.0.4) return 'login failed'. here's screencast of issue: http://youtu.be/yqiymfh5y3u
solution 2: in settings > facebook, there list of apps have (or don't have) permission access facebook natively via sdk. app marked disabled in list. make sure application enabled in list.
when using facebook module on trigger.io authorization on iphone, forge.facebook.authorize api call not opening facebook authorization window expected.
from trigger.io facebook module docs forge.facebook.authorize:
authorize current user facebook. may show login ui if new permissions required, or valid login token not available (i.e. on first login).
instead, error callback being called message:
{"message":"login failed","type":"expected_failure","subtype":null}
running same code in ios simulator (v7.0.3) opens facebook web login prompt expected.
calling forge.facebook.hasauthorized returns error, expected:
{"message":"user not logged in or insufficient read permissions","type":"expected_failure","subtype":null}
the call forge.facebook.authorize without permissions or audience parameters; success , error callbacks.
testing configuration:
- trigger.io v2.1.4
- facebook module v2.3
- iphone 5 (ios 7.0.4)
- facebook ios app v8.0
any ideas on how forge.facebook.authorize function open facebook login prompt?
update #1:
i managed error reproduce on ios simulator. tried adding permissions , audience parameters , think issue audience parameter not being parsed string when being sent facebook, causing request error out.
here's log output: [ info] 2014-03-24 17:39:39.750 forge[9247:a0b] [debug] native call: { [ info] callid = "31f68389-de82-4f71-a689-213e008a28e6"; [ info] method = "facebook.authorize"; [ info] params = { [ info] audience = friends; [ info] dialog = 1; [ info] permissions = ( [ info] "read_stream", [ info] "public_actions" [ info] ); [ info] }; [ info] start = "1395697179.74"; [ info] } [ info] 2014-03-24 17:39:39.937 forge[9247:1503] [warning] error reporting partner data facebook
update #2:
removing permissions , audience parameters works on ios simulator: [ info] 2014-03-24 18:28:22.652 forge[10387:a0b] [debug] native call: { [ info] callid = "22233011-4a9f-41e0-841e-4616e9e944d9"; [ info] method = "facebook.authorize"; [ info] params = { [ info] dialog = 0; [ info] permissions = ( [ info] ); [ info] }; [ info] start = "1395700102.606"; [ info] }
"public_actions" not valid permission string.
did perhaps mean "publish_actions" ?
the full list of permissions documented here: https://developers.facebook.com/docs/facebook-login/permissions/
Comments
Post a Comment