Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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.

— asked November 11th 2010 by Vali Filip
  • facebook
  • loginbutton
  • post
  • publish
0 Comments

2 Answers

  • Bump

    — answered January 14th 2011 by Scott Millar
    permalink
    0 Comments
  • 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

    — answered January 14th 2011 by Eddie Monge
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.