Using Facebook's PHP SDK, I was able to get Facebook login working pretty quickly on my website. They simply set a $user
variable that can be accessed very easily.
I've had no such luck trying to get Twitter's OAuth login working... quite frankly, their github material is confusing and useless for someone that's relatively new to PHP and web design, not to mention that many of the unofficial examples I've tried working through are just as confusing or are outdated.
I really need some help getting Twitter login working--I mean just a basic example where I click the login button, I authorize my app, and it redirects to a page where it displays the name of the logged in user.
I really appreciate your help.
EDIT I'm aware of the existence of abraham's twitter oauth but it provides close to no instructions whatsoever to get his stuff working.
I just tried abraham's twitteroauth from github and it seems to work fine for me. This is what I did
Thats it. If you now navigate to http://www.example.com/twitteroauth, you will get a "Signin with Twitter", that will take you to Twitter , authorize the request and get you back to the index.php page.
EDIT: Example will not work but do not worry. Follow the above steps and upload to server. Make sure you rename the file from github repository i.e. config-sample.php->config.php
if you want to see a working sample, find it here