How to login, logout, login as a different user in my IPhone application

It is a bit tricky to switch Facebook users in IOS applications. This is a post documenting my experience

acebook Log In / Log Out Instruction

  1. Step 1:

    1. log In as one sure by tapping the profile picture in MyCalendar page  (Skip this step if you are already logged in)

    2. enter email and password if this is the first time you use the app

    3. authorize the app

  2. Step 2:

    1. close safari web browser on the simulator

    2. remove the cache at directory

      1. /Users/zhangyunming1990/Library/Application Support/iPhone Simulator/6.1/Library/Cookies/Cookies.binarycookies

  3. Step 3:

    1. tap the profile picture in MyCalendar page again

    2. enter the new  facebookuser’s email and password in the window prompted up

    3. click  ok in authorization page

    4. (At this point, a new Cookies.binarycookies file should be be generated in /Users/zhangyunming1990/Library/Application Support/iPhone Simulator/6.1/Library/Cookies/, this new file should contain information for the new facebook user)

  4. Step 4:

    1. close our app (close Social Calendar)

    2. restart the app (or restart the simulator)

    3. tap the profile picture

  5. Step 5:

    1. now you should be logged in as the new facebook user

Link to the cookies

/Users/zhangyunming1990/Library/Application Support/iPhone Simulator/6.1/Library/Cookies

This entry was posted in Facebook API, IPhone App Development. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s