简体   繁体   中英

Facebook session Fetching from facebook app in iphone

I have created a sample iphone application that uses facebook api. Its work fine.I have logged in using facebook api and store the accessstoken and expiredate in NSUserDefault. When they again enter into my application.I have checked the facebook session is valid,if its valid we cannot show a login screen.

We use the session for further operation. This is the process my app working now.

What i want is , I have downloaded a facebook app in my iphone.I logged into facebook app using my facebook account. Now i want to run my sample application,it shows an login dialog. Here i dont want to get user credential because they already logged in on facebook app.So i want to get that facebook sesssion and use it in my application.

Is it possible ? Thanks in advance..........

My objective is to get the facebook session from another application .(If he logged in using facebook account.)

You cannot access the data from another app's sandbox. But the Facebook SDK for iOS automatically tries to circumvent it: it checks if the Facebook app is installed and if it is, launches it so that the user can authorize your app and then relaunches your app. All you have to do is register a custom URL scheme so that the Facebook app can relaunch your app. The whole procedure is described in the SDK documentation.

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