html - Twitter OAuth (PHP): Need good, basic example to get started -
using facebook's php sdk, able facebook login working pretty on website. set $user
variable can accessed easily.
i've had no such luck trying twitter's oauth login working... quite frankly, github material confusing , useless that's relatively new php , web design, not mention many of unofficial examples i've tried working through confusing or outdated.
i need getting twitter login working--i mean basic example click login button, authorize app, , redirects page displays name of logged in user.
i appreciate help.
edit i'm aware of existence of abraham's twitter oauth provides close no instructions whatsoever stuff working.
i tried abraham's twitteroauth github , seems work fine me. did
- git clone https://github.com/abraham/twitteroauth.git
- upload webhost domain, say, www.xyz.com
- go twitter apps , register application. changes need (assuming use abraham's twitteroauth example hosted @ http://www.xyz.com/twitteroauth)
a) application website http://www.xyz.com/twitteroauth
b) application type browser
c) callback url http://www.xyz.com/twitteroauth/callback.php (callback.php included in git source) - once this, consumer_key , consumer_secret can update in config.php twitteroauth distribution. set callback same http://www.xyz.com/twitteroauth/callback.php
thats it. if navigate http://www.xyz.com/twitteroauth, "signin twitter", take twitter , authorize request , index.php page.
if want running example, did here.
edit: example not work not worry. follow above steps , upload server. make sure rename file github repository i.e. config-sample.php->config.php
if want see working sample, find here
Comments
Post a Comment