4 ms·
One big problem I see right off the bat: the twitterLogin() function completely breaks any page I embed this in, since if a visitor isn't logged in, all they se
by pavel_lishin 16y ago
One big problem I see right off the bat: the twitterLogin() function completely breaks any page I embed this in, since if a visitor isn't logged in, all they see is a link to twitter, and then nothing since you're calling exit().
Another nitpick: if I'm logged in, and twitterCallback() is called, why is it redirecting me to / ? Perhaps my site is nested deep within a directory structure.
- makethetick 16y agoThe script is just a basic login system, designed to be adapted to your needs since every application will differ. I might add a login button function that will allow you to put the login button anywhere without protecting the page at the same time.
- makethetick 16y agoI've made a few changes, please check the new script. twitterLogin() is used to produce a login link, twitterProtect() will protect any sensitive pages. You can also set where users are redirected to.