简体   繁体   中英

How to get Facebook access token and User ID on iphone

I want to make a demo of using OAuth to get a facebook access token in a mobile app. i have a button on the main view. After button is clicked, I use safari to open the facebook OAuth dialog. After logging in to facebook, I can't figure out how to get the access token and UserID.

You need to spend some time reading the documentation on how Facebook works with iOS . Specifically there is a whole documentation section dedication to iOS authentication .

The way you are currently doing it with redirecting to Safari is not the preferred way of handling this as far as I know.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM