PHP OAuth Example Code

110 views
Skip to first unread message

Abraham Williams

unread,
Feb 14, 2009, 9:03:06 PM2/14/09
to Twitter Bot
I wrote up some example code to get OAuth working in PHP.

Code: http://github.com/poseurtech/twitteroauth
Live example: http://twitter.abrah.am
Docs: https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4

Feel free to contact me if you have any questions/find bugs/etc.

I'm working on converting http://github.com/jdp/twitterlibphp to use OAuth and should have that complete in a few days.

Abraham
@poseurtech

--
Abraham Williams | http://the.hackerconundrum.com
Web608 | Community Evangelist | http://web608.org
This email is: [x] blogable [ ] ask first [ ] private.
Sent from: Madison Wi United States.

dougw

unread,
Feb 15, 2009, 12:01:33 AM2/15/09
to Twitter Development Talk
Very nice, I'll be implementing your twitterlibphp updates when they
are available and will forward along any appropriate feedback. Thanks
for sharing!

@dougw

On Feb 14, 9:03 pm, Abraham Williams <4bra...@gmail.com> wrote:
> I wrote up some example code to get OAuth working in PHP.
>
> Code:http://github.com/poseurtech/twitteroauth
> Live example:http://twitter.abrah.am
> Docs:https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4
>
> Feel free to contact me if you have any questions/find bugs/etc.
>
> I'm working on convertinghttp://github.com/jdp/twitterlibphpto use OAuth

dean.j.robinson

unread,
Feb 15, 2009, 5:15:13 AM2/15/09
to Twitter Development Talk
An enormous thank you from me too! Every other library/example I've
found either didn't appear to work or was a clear a mud to me.

thanks again for sharing.


On Feb 15, 1:03 pm, Abraham Williams <4bra...@gmail.com> wrote:
> I wrote up some example code to get OAuth working in PHP.
>
> Code:http://github.com/poseurtech/twitteroauth
> Live example:http://twitter.abrah.am
> Docs:https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4
>
> Feel free to contact me if you have any questions/find bugs/etc.
>
> I'm working on convertinghttp://github.com/jdp/twitterlibphpto use OAuth

Dharmesh

unread,
Feb 15, 2009, 2:39:08 AM2/15/09
to Twitter Development Talk
Thanks for sharing this. I was able to get the example code working
with very minimal effort.

Nicely done.

Regards,
Dharmesh
http://twitter.com/dharmesh

On Feb 14, 9:03 pm, Abraham Williams <4bra...@gmail.com> wrote:
> I wrote up some example code to get OAuth working in PHP.
>
> Code:http://github.com/poseurtech/twitteroauth
> Live example:http://twitter.abrah.am
> Docs:https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4
>
> Feel free to contact me if you have any questions/find bugs/etc.
>
> I'm working on convertinghttp://github.com/jdp/twitterlibphpto use OAuth

Chad Etzel

unread,
Feb 15, 2009, 12:23:42 PM2/15/09
to twitter-deve...@googlegroups.com
+1

Works very well. Thanks!
-Chad

Alex Payne

unread,
Feb 17, 2009, 3:08:32 PM2/17/09
to twitter-deve...@googlegroups.com
Thanks much! I'm collecting these on http://apiwiki.twitter.com/OAuth-Examples

--
Alex Payne - API Lead, Twitter, Inc.
http://twitter.com/al3x

johnjaw3d

unread,
Mar 22, 2009, 2:39:49 AM3/22/09
to Twitter Development Talk
http://cvs.php.net/viewvc.cgi/pecl/oauth/examples/twitter/

On Feb 17, 1:08 pm, Alex Payne <a...@twitter.com> wrote:
> Thanks much! I'm collecting these onhttp://apiwiki.twitter.com/OAuth-Examples
>
>
>
> On Sun, Feb 15, 2009 at 09:23, Chad Etzel <jazzyc...@gmail.com> wrote:
>
> > +1
>
> > Works very well. Thanks!
> > -Chad
>
> > On Sun, Feb 15, 2009 at 2:39 AM, Dharmesh <dharme...@gmail.com> wrote:
>
> >> Thanks for sharing this.  I was able to get the example code working
> >> with very minimal effort.
>
> >> Nicely done.
>
> >> Regards,
> >> Dharmesh
> >>http://twitter.com/dharmesh
>
> >> On Feb 14, 9:03 pm, Abraham Williams <4bra...@gmail.com> wrote:
> >>> I wrote up some example code to get OAuth working in PHP.
>
> >>> Code:http://github.com/poseurtech/twitteroauth
> >>> Live example:http://twitter.abrah.am
> >>> Docs:https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4
>
> >>> Feel free to contact me if you have any questions/find bugs/etc.
>
> >>> I'm working on convertinghttp://github.com/jdp/twitterlibphptouse OAuth

Unmesh

unread,
Mar 22, 2009, 3:16:41 PM3/22/09
to Twitter Development Talk
A big thanks. Made it fairly easy to implement OAuth on my site. Only
thing I did was add a line to parse the verify_credentials xml into an
assoc array
$authXml = $twAuthHandle->OAuthRequest('https://twitter.com/
account/verify_credentials.xml', array(), 'POST');
> $_SESSION['some_key'] = $authXml;
> $twAuthInfo = new SimpleXMLElement($authXml);
Also, ended up storing the xml in the session (so I dont have to call
verify_credentials on page refresh).

--
Unmesh
http://sadakmap.com/twitter
http://twitter.com/sadakmap

On Feb 15, 7:03 am, Abraham Williams <4bra...@gmail.com> wrote:
> I wrote up some example code to get OAuth working in PHP.
>
> Code:http://github.com/poseurtech/twitteroauth
> Live example:http://twitter.abrah.am
> Docs:https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4
>
> Feel free to contact me if you have any questions/find bugs/etc.
>
> I'm working on convertinghttp://github.com/jdp/twitterlibphpto use OAuth
Reply all
Reply to author
Forward
0 new messages