Is it possible to call native ios Facebook login dialog from just a web page (not a web app)?

前端 未结 4 1752
一向
一向 2021-02-04 10:59

We have an ios app that uses native Facebook login just fine.

Then we also have a website (app is basically an optimized client for it) where people can login via Facebo

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-04 11:53

    Difficult way As described here http://aaronparecki.com/articles/2012/07/29/1/oauth2-simplified#mobile-apps you could find URL scheme to trigger the native iOS app for app authorization:

    fbauth://authorize?redirect_uri=[redirect_uri]&client_id=[client_id]&response_type=token
    

    But if you call that link it's not possible to have a redirection. You could try to hack that redirection but maybe you could not find a way out.

    A secure way to solve that problem is to use a SSO token to authenticate user on your App when he logs in, and next on Safari take a redirection, with a custom url to your APP, that do as bridge to FB App via Token stored in your APP. After FB authentication you can directly redirect user back to your landing page in Safari. As said by @Lego it's an alternative way to direct authenticate that could be made by going deep to custom URL used by FB.

提交回复
热议问题