[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
Hey, I guess this question should have been directed at Abraham. I realized it was his code example I was making use of. I edited oAuth.php to make use of the $callback_url that was originally designated as null, and carried that over in to OAuthToken and OAuthConsumer constructs. Within OAuthToken, I modified the string serialization of the token response to this: function to_string() {/*{{{*/ return "oauth_token=" . OAuthUtil::urlencode_rfc3986($this->key) . "&oauth_token_secret=" . OAuthUtil::urlencode_rfc3986($this- >secret) . "&oauth_callback=" . OAuthUtil::urlencode_rfc3986($this- >callback_url); Not sure if i've taken this too far, but I guess if Abraham could respond, it would be awesome! Thanks everyone On Aug 12, 5:57 am, Andrew Badera wrote: > On Wed, Aug 12, 2009 at 1:44 AM, jaike wrote: > > > Andrew, > > > I can't seem to get this working and wanted to see if you would be > > able to shed some light... thx > > > in my main index i created a variable: > > > (i tried with both of these) > > $callback_url ='&callback_url=http%3A%2F%2Fwww.tweetivism.com%2Fblog'; > > $callback_url ='http%3A%2F%2Fwww.tweetivism.com%2Fblog'; > > > and within the default case i added $callback_url to the constructor > > > $to = new TwitterOAuth($consumer_key, $consumer_secret, > > $callback_url); > > > and im still redirecting to where I have it set in the app backend on > > twitter... am I on the right track at all? > > > thx > > Perhaps it's an issue with the specific library it looks like you're > using? I was doing callbacks to various addresses all day long > yesterday, no problems. I'm not in PHP and not using a third party > library though. > > ∞ Andy Badera > ∞ This email is: [ ] bloggable [x] ask first [ ] private > ∞ Google me:http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
Are you using my PHP library? It does not have oauth_callback support yet. Abraham 2009/8/11 jaike > > Andrew, > > I can't seem to get this working and wanted to see if you would be > able to shed some light... thx > > in my main index i created a variable: > > (i tried with both of these) > $callback_url ='&callback_url=http%3A%2F%2Fwww.tweetivism.com%2Fblog'; > $callback_url ='http%3A%2F%2Fwww.tweetivism.com%2Fblog'; > > and within the default case i added $callback_url to the constructor > > $to = new TwitterOAuth($consumer_key, $consumer_secret, > $callback_url); > > and im still redirecting to where I have it set in the app backend on > twitter... am I on the right track at all? > > thx > > On Jul 26, 5:10 am, Andrew Badera wrote: > > On Tue, Jul 21, 2009 at 3:08 AM, CG wrote: > > > > > you can use localhost ? really ? just update the callback to > > >http://localhost/xxx? > > > > Sorry, missed this. Yeah, just use the oauth_callback parameter when > making > > the call. > -- Abraham Williams | Community Evangelist | http://web608.org Hacker | http://abrah.am | http://twitter.com/abraham Project | http://fireeagle.labs.poseurtech.com This email is: [ ] blogable [x] ask first [ ] private. Sent from Fairbanks, Alaska, United States
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
On Wed, Aug 12, 2009 at 1:44 AM, jaike wrote: > > Andrew, > > I can't seem to get this working and wanted to see if you would be > able to shed some light... thx > > in my main index i created a variable: > > (i tried with both of these) > $callback_url ='&callback_url=http%3A%2F%2Fwww.tweetivism.com%2Fblog'; > $callback_url ='http%3A%2F%2Fwww.tweetivism.com%2Fblog'; > > and within the default case i added $callback_url to the constructor > > $to = new TwitterOAuth($consumer_key, $consumer_secret, > $callback_url); > > and im still redirecting to where I have it set in the app backend on > twitter... am I on the right track at all? > > thx > Perhaps it's an issue with the specific library it looks like you're using? I was doing callbacks to various addresses all day long yesterday, no problems. I'm not in PHP and not using a third party library though. ∞ Andy Badera ∞ This email is: [ ] bloggable [x] ask first [ ] private ∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
Andrew, I can't seem to get this working and wanted to see if you would be able to shed some light... thx in my main index i created a variable: (i tried with both of these) $callback_url ='&callback_url=http%3A%2F%2Fwww.tweetivism.com%2Fblog'; $callback_url ='http%3A%2F%2Fwww.tweetivism.com%2Fblog'; and within the default case i added $callback_url to the constructor $to = new TwitterOAuth($consumer_key, $consumer_secret, $callback_url); and im still redirecting to where I have it set in the app backend on twitter... am I on the right track at all? thx On Jul 26, 5:10 am, Andrew Badera wrote: > On Tue, Jul 21, 2009 at 3:08 AM, CG wrote: > > > you can use localhost ? really ? just update the callback to > >http://localhost/xxx? > > Sorry, missed this. Yeah, just use the oauth_callback parameter when making > the call.
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
On Tue, Jul 21, 2009 at 3:08 AM, CG wrote: > > you can use localhost ? really ? just update the callback to > http://localhost/xxx ? > Sorry, missed this. Yeah, just use the oauth_callback parameter when making the call.
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
Yes, you can use http://localhost/... for the callback. I used this method when I was integrating OAuth into my application. Scott On Jul 21, 3:08 am, CG wrote: > you can use localhost ? really ? just update the callback > tohttp://localhost/xxx? > > On Mon, Jul 20, 2009 at 6:06 PM, Andrew Badera wrote: > > On Mon, Jul 20, 2009 at 6:05 AM, CG wrote: > > >> Please ignore my question, I already solve it. > > >> It seems like it required a 'real' callback URL to accomplish the > >> authentication. > > >> CG > > > What do you mean by "real"? I'm able to authenticate using a localhost > > address for testing. > > > Thanks- > > - Andy Badera > > - and...@badera.us > > - Google me:http://www.google.com/search?q=andrew+badera > > - This email is: [ ] bloggable [x] ask first [ ] private
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
you can use localhost ? really ? just update the callback to http://localhost/xxx ? On Mon, Jul 20, 2009 at 6:06 PM, Andrew Badera wrote: > On Mon, Jul 20, 2009 at 6:05 AM, CG wrote: >> >> Please ignore my question, I already solve it. >> >> It seems like it required a 'real' callback URL to accomplish the >> authentication. >> >> CG >> > > > What do you mean by "real"? I'm able to authenticate using a localhost > address for testing. > > > Thanks- > - Andy Badera > - and...@badera.us > - Google me: http://www.google.com/search?q=andrew+badera > - This email is: [ ] bloggable [x] ask first [ ] private > > >
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
On Mon, Jul 20, 2009 at 6:05 AM, CG wrote: > > Please ignore my question, I already solve it. > > It seems like it required a 'real' callback URL to accomplish the > authentication. > > CG > > What do you mean by "real"? I'm able to authenticate using a localhost address for testing. Thanks- - Andy Badera - and...@badera.us - Google me: http://www.google.com/search?q=andrew+badera - This email is: [ ] bloggable [x] ask first [ ] private
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
Please ignore my question, I already solve it. It seems like it required a 'real' callback URL to accomplish the authentication. CG On Jul 20, 4:50 pm, CG wrote: > Hi Abraham, > Thanks for your reply ! ... I am actually referring to your example > come with PHP library (twitterOAuth) to do my first Twitter App :) > > I have read through the code in index.php , and I modified it to > output the token and token_secret on screen. Then I write another php > script , to use the consumer key , consumer secret , access_token and > access_token_secret to create an instance of TwitterOAuth , then call > OAuthRequest("https://twitter.com/statuses/update.xml";, array('status' > => Test OAuth update. #testoauth', 'POST'), however, it returns "Could > not authenticate you" > > Am I have the wrong concept ? > > Below is my code > > > > require_once('twitterOAuth.php'); > > /* Consumer key from twitter */ > $consumer_key = ''; > /* Consumer Secret from twitter */ > $consumer_secret = ''; > > $token = ''; > $secret = '''; > > $to = new TwitterOAuth($consumer_key, $consumer_secret, $token, > $secret); > > /* Run request on twitter API as user. */ > > $content = $to->OAuthRequest('https://twitter.com/statuses/ > update.xml', array('status' => 'Test OAuth update. #testoauth'), > 'POST'); > > ?> > > print_r($content); > > > > Thanks ... > > On Jul 20, 4:26 pm, Abraham Williams <4bra...@gmail.com> wrote: > > > On Mon, Jul 20, 2009 at 03:17, CG wrote: > > > My question are > > > > 1. In step 2, I save the token and secret , how long it will lasts ? > > > Until the user revokes access. There is currently no amount of time access > > tokens are valid for. > > > > 2. Is this app feasible or not ? Is twitter allow posting of update by > > > 3rd party app in background ? > > > Yes. This is how many applications work. > > Abraham > > > -- > > Abraham Williams | Community Evangelist |http://web608.org > > Hacker |http://abrah.am|http://twitter.com/abraham > > Project |http://fireeagle.labs.poseurtech.com > > This email is: [ ] blogable [x] ask first [ ] private. > > Sent from Madison, WI, United States
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
Hi Abraham, Thanks for your reply ! ... I am actually referring to your example come with PHP library (twitterOAuth) to do my first Twitter App :) I have read through the code in index.php , and I modified it to output the token and token_secret on screen. Then I write another php script , to use the consumer key , consumer secret , access_token and access_token_secret to create an instance of TwitterOAuth , then call OAuthRequest("https://twitter.com/statuses/update.xml";, array('status' => Test OAuth update. #testoauth', 'POST'), however, it returns "Could not authenticate you" Am I have the wrong concept ? Below is my code '; /* Consumer Secret from twitter */ $consumer_secret = ''; $token = ''; $secret = '''; $to = new TwitterOAuth($consumer_key, $consumer_secret, $token, $secret); /* Run request on twitter API as user. */ $content = $to->OAuthRequest('https://twitter.com/statuses/ update.xml', array('status' => 'Test OAuth update. #testoauth'), 'POST'); ?> print_r($content); Thanks ... On Jul 20, 4:26 pm, Abraham Williams <4bra...@gmail.com> wrote: > On Mon, Jul 20, 2009 at 03:17, CG wrote: > > My question are > > > 1. In step 2, I save the token and secret , how long it will lasts ? > > Until the user revokes access. There is currently no amount of time access > tokens are valid for. > > > > > 2. Is this app feasible or not ? Is twitter allow posting of update by > > 3rd party app in background ? > > Yes. This is how many applications work. > Abraham > > -- > Abraham Williams | Community Evangelist |http://web608.org > Hacker |http://abrah.am|http://twitter.com/abraham > Project |http://fireeagle.labs.poseurtech.com > This email is: [ ] blogable [x] ask first [ ] private. > Sent from Madison, WI, United States
[twitter-dev] Re: Newbie to seek advice on the flow of a twitter app with OAuth
On Mon, Jul 20, 2009 at 03:17, CG wrote: > My question are > > 1. In step 2, I save the token and secret , how long it will lasts ? > Until the user revokes access. There is currently no amount of time access tokens are valid for. > > 2. Is this app feasible or not ? Is twitter allow posting of update by > 3rd party app in background ? > Yes. This is how many applications work. Abraham -- Abraham Williams | Community Evangelist | http://web608.org Hacker | http://abrah.am | http://twitter.com/abraham Project | http://fireeagle.labs.poseurtech.com This email is: [ ] blogable [x] ask first [ ] private. Sent from Madison, WI, United States