Login/Publish Facebook mixed purpose button
Hi all. I am interested in having one button that will enable me to do those 2 things in the title.
If I am not logged in, open the Facebook login window and allow me to do just that, and on the login event, open another one with publishStream and write on my wall.
If I am logged in, just the second part.
But there are 2 problems…the login window can be opened just by a Ti login button, and that button does not receive a programatic 'click' event so that i could open the login window when needed.
So, does anyone have an idea how could I achieve my goal?
Thanks in advance.
Vali.
2 Answers
-
Bump
-
Check to see if the user is logged in and if so open the publish window. if that person isnt logged in the open the login window and add an event listener for the login event and if it is successful, launch the publish window.
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Facebook.LoginButton-object.html