0

The instagram API authentication page does not have any information on how to log out a user: On an iOS app using the API, how am I supposed to allow users to log out?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
GoldenJoe
  • 7,874
  • 7
  • 53
  • 92
  • 1
    Is this relavant http://stackoverflow.com/questions/10991753/instagram-api-user-logout. I am not sure but thought it would help. – Khushal Dave May 23 '14 at 21:54
  • Thanks...I don't really understand the implementation posted, but I'll spend some time with it and try to figure it out. – GoldenJoe May 24 '14 at 01:55

2 Answers2

4

To logout the user you should only delete the token. If the user doesn't want your app to access their data they will cancel your app access.

If you want to provide a way for the user to logout from your app, you can do it on your login implementation (if you have a backend, of course), otherwise just send the user back to the login screen and delete the token.

jturolla
  • 6,596
  • 7
  • 26
  • 41
  • I see, so deleting the token is all that is expected. I still don't understand how a backend implementation of login would work though. I was researching and found a suggestion to sniff out what POST data the login page expects, but that seems hacky. How are you supposed to build that component? – GoldenJoe May 24 '14 at 01:53
-3

Im making android app using html5, I did the following: Redirect the user to a html5 page containing following code:

            <div id = "loading" style="text-align: center; display:block; margin-top: 150px;">
                    <img alt="" src="/css/themes/images/ajax-loader.gif" width="46px" height="46px">
                    <br><font style="text-align: center;">Logging Out...</font>
            </div>

        </div>

Then call setTimeout() in which im calling my index.html the homepage after 2seconds.

user3519216
  • 375
  • 2
  • 15