Welcome Guest, Not a member yet? Register   Sign In
tmhOAuth (PHP Twitter OAuth library) port to CodeIgniter
#1

[eluser]demogar[/eluser]
Hello guys,

I needed to have working the tmhOAuth OAuth Twitter library on my CodeIgniter project and what I did was to port this library as a CodeIgniter library with some more changes (some new methods for easy access).

You can find the library here:
https://github.com/demogar/tmhOAuth-codeigniter

I made a small application as an example:
http://www.beispanama.com

What this application does: it lets you log in with your Twitter Application, modifies your Twitter Profile Image, add two accounts to your following list (if checked) and post a message to twitter (if checked).

All the code for this application is released too. I'm not the best programmer, but I wanted to share this code with you all.

Regards :]
#2

[eluser]include[/eluser]
Hi there - this seems really great, i'm just getting into Codeigniter and need to setup some sort of twitter integration, so this is great!

I've downloaded your app and it doesn't appear to be working correctly, on clicking the sign in with twitter button, nothing happens? The page reloads, the url states the correct URI but no twitter redirection.

Anything you can recommend? Would love to get this up and running!

Thanks

C.
#3

[eluser]demogar[/eluser]
Hey include,

Just a few minor notes:
- On application/config/ you'll see a list of /config/*.exampe.php items. Just be sure to modify all of them with your current settings.
- Did you create a Twitter Application and modified the /config/twitter.php file?
- Check the logs, maybe they say something Tongue

I have to document everything, I will do it as soon as possible.
#4

[eluser]include[/eluser]
Thanks for the response :-)

Yeah changed all the example config files to work with my database, config and twitter credentials.

Once you click the login button, it appears to be loading something, but then does nothing.

What version of CI should i be using?

Thanks again!
#5

[eluser]demogar[/eluser]
Its CI 2.0 Smile
#6

[eluser]Atharva[/eluser]
[quote author="demogar" date="1297134546"]Its CI 2.0 Smile[/quote]

Hi demogar,

I need this lib for 1.7.* version of CI. Is there any way I can get it?


Thanks
Atharva
#7

[eluser]demogar[/eluser]
Hey Atharva,

Did you try it under CI 1.7? If so: what didn't work under CI 1.7?
#8

[eluser]Atharva[/eluser]
Yes, I tried with 1.7.2 with correct consumer and secret key, but it redirects me to https://api.twitter.com/oauth/authorize?oauth_token= with no oauth_token which shows error like
Quote:Woah there!

This page is no longer valid. It looks like someone already used the token information you provided. Please return to the site that sent you to this page and try again … it was probably an honest mistake.


I am not sure if this error is related with your lib. Just wanted to confirm .
#9

[eluser]demogar[/eluser]
Hello,

Make sure you are using under your config.php file PATH_INFO for the uri_protocol, like this:

Code:
$config['uri_protocol']    = "PATH_INFO"

I will make a tiny documentation as soon as possible, maybe by the end of the week.
#10

[eluser]demogar[/eluser]
If you are using CI 2.0, and you want to allow GET parameters on your controller, you can use the method described here:
http://stackoverflow.com/questions/33470...parameters

Also, in CI 2.0, instead of PATH_INFO you may try "REQUEST_URI" under your config.php file.




Theme © iAndrew 2016 - Forum software by © MyBB