2
我在iPhone中集成了Instagram,第一次登錄頁面顯示在我的iPhone上,登出後再次登錄時比憑證不登陸並直接登錄。我也沒有註銷舊證書,我也清除了註銷cookie,但它不工作。當我從safari刪除cookie,然後它工作正常。如何在程序上解決它。Instagram註銷不適用於iPhone?
註銷按鈕的代碼如下
-(void)doLogout
{
IGAppDelegate* appDelegate = (IGAppDelegate*)[UIApplication sharedApplication].delegate;
[cookies deleteCookie:cookie];
// clear cookie
NSHTTPCookieStorage* cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage];
NSArray* instagramCookies = [cookies cookiesForURL:[NSURL URLWithString:@"https://instagram.com/"]];
NSLog(@"Array is == %@",instagramCookies);
for (NSHTTPCookie* cookie in instagramCookies)
{
[cookies deleteCookie:cookie];
}
// accessToken set nil
[[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"accessToken"];
[[NSUserDefaults standardUserDefaults] synchronize];
[self.navigationController popViewControllerAnimated:YES];
}
我面臨同樣的問題......如果任何解決方案,然後plz發佈它作爲答案。 –
你在safari中打開它的存儲其證書,你必須在webview中打開Instagram登錄URL。 –