Instancia global de Facebook en la aplicación de iPhone [cerrado]

I would like to have my app log users into facebook in a settings view and then save the information into userdefaults. When the app loads, it should log into facebook if the information is in userdefaults, and if not, continue operating normally without facebook functionality. Basically, I want one instance of facebook which is loaded at the beginning, and all the information used throughout every view in the app.

¿Es esto posible?

Everything that I have seen so far shows one instance per view which is not what I want.

preguntado el 27 de agosto de 11 a las 18:08

1 Respuestas

We do it all the time in our apps.

I typically create a Facebook singleton to manage the Facebook interaction and store the token in either NSUserDefaults or the Keychain, depending on the application.

Respondido 28 ago 11, 19:08

Thanks. I wasn't aware of what a singleton was until now. - Alex

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.