Reputation: 5323
I am using FacebookConnect on the iPhone to integrate my app with Facebook. Unfortunatly I've always "cookies required" when trying to login.
Are you also encountering this issue or do you know what may cause this issue?
Thanks in advance for your help :)
Regards,
Upvotes: 0
Views: 1879
Reputation: 11
Yes, you can change the settings for enabling / disabling cookies programmatically in iOS. NSHTTPCookieStorage
is the class used for this.
Here is how you enable it:
[[NSHTTPCookieStorage sharedHTTPCookieStorage]
setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
Be informed that this is a shared cookie storage that is universal to the app you are using it in. Cookies are not shared among the apps in iOS due to sandbox architecture.
The default value of this policy is NSHTTPCookieAcceptPolicyAlways
, so if you are experiencing this issue while logging in through Facebook connect, there are high chances that you have set its value explicitly to NSHTTPCookieAcceptPolicyNever
(or altered it to some other) somewhere else in the app, and this is the side effect of that.
Upvotes: 1