instagram-ios-sdk
instagram-ios-sdk copied to clipboard
Logout !
Hi
How to logout not just inside the application, how to login with a new user because it always return to the first login
I think we must clear cookies from Safari
Thanks
Look at issue #4
It works just for UIWebView, if you use this sdk to open in Safari, you can't clear cookies to login with different account.
yes, at the moment this is the limit.
Hi Crino..
How can we handle log out functionality on safari.. Is there any way of doing this..?
I din't test yet, let me know if works:
NSURL *url = [NSURL URLWithString:@"https://instagram.com/"];
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
NSEnumerator *enumerator = [[cookieStorage cookiesForURL:url] objectEnumerator];
NSHTTPCookie *cookie = nil;
while ((cookie = [enumerator nextObject])) {
[cookieStorage deleteCookie:cookie];
}
If will work i'll include into the SDK
i have cheked it, but it doesn't work with safari .
Can we use sdk by opening Instagram login page in webView for authentication ?
must be implemented a webview inside the SDK and disable the safary 'flow'
i'll do asap
Hi crino
i have used webView and it working fine for me. After doing some modification i'll upload code of that.
Thanks for your help :)
@gouravgupta72 Hi there, have you uploaded the code anywhere? I would love to know how I can log out, especially using a UIWebView in the application rather than having to switch to Safari. Thanks! :)
Hi,
i will upload it soon and provide link to all.
Gourav Gupta, sent from my BlackBerry. -----Original Message----- From: RyanTLX Sent: 21/01/2014 6:19:16 pm Subject: Re: [instagram-ios-sdk] Logout ! (#31)
@gouravgupta72 Hi there, have you uploaded the code anywhere? I would love to know how I can log out, especially using a UIWebView in the application rather than having to switch to Safari. Thanks! :)
Reply to this email directly or view it on GitHub: https://github.com/crino/instagram-ios-sdk/issues/31#issuecomment-32871015
Hi, I had fixed logout issue of instagarm sdk. You can download updated sdk with sample from https://github.com/gouravgupta72/instagramIOSsdk/ link.
Thanks, Gourav
@gouravgupta72 it doesn't work :(
@v0l0d what problem you are facing.?
can you explain coz i had tested it and it is working fine.
i had a same problem so i remove all cookie from webview NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (NSHTTPCookie *cookie in [storage cookies]) { [storage deleteCookie:cookie]; } [[NSUserDefaults standardUserDefaults] synchronize];