Facebook login always comes back as cancelled. (iOS Swift) -
i'm trying implement facebook login using 4.0 version of sdk, happens 3.+ version. when call loginwithreadpermissions (4.0 version) or openactivesessionwithreadpermissions (3.+ version). closure/block called iscancelled (4.0 version) , closedfailedlogin (3.+ version) before user can make selection (cancel or ok). thought may problem url scheme in plist settings i've checked on , on , seems right. wondering if may have ideas on solving problem. bundle id right, single signin on, native app enabled, in facebook dev console. see sample code , configurations below (4.0 version).
login call:
appdelegate:
plist:
i had problem found workaround. can set login behaviour of login manager use facebook details on phone. default behaviour fbsdkloginbehaviorsystemnative , tries use facebook app first , if not there, uses web modal.
instead of doing way , passing around urls don't seem work can set login behaviour fbsdkloginbehaviorsystemaccount.
long story short, try:
let fbloginmanager = fbsdloginmanager(); fbloginmanager.loginbehavior = fbsdkloginbehaviorsystemaccount; // call login method of choice here
Comments
Post a Comment