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: login call

appdelegate: appdelegate

plist: 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

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -