Sounds like the oauth_callback parameter for /oauth/request_token is wrong. ;-)
Tom On 9/14/10 10:47 PM, Andy Reid wrote: > Oddly enough. No. I just dumped the response toString(): > > OAuthToken{token='zzzzzzzzz', tokenSecret='yyyyyyyyy', > secretKeySpec=null} > > This is odd because it actually comes back to the correct page. > > However, when I manually set the default callback url (in > dev.twitter.com) the oAuth worked completely fine and I was able to > send updates, etc. The destination domain for the desired callback is > in the list, and, like I said, it even came back to the correct page. > > Any idea what that could be?! > > Thanks, > Andy > > On Sep 10, 3:11 pm, Tom van der Woerdt <i...@tvdw.eu> wrote: >> Do you get a confirmation on the callback after request_token? >> >> Tom >> >> On 9/10/10 9:55 PM, Andy Reid wrote: >> >> >> >>> Hi -- >> >>> I'm trying to get my oAuth working with twitter4j and ColdFusion. >> >>> Here's the code I use: >> >>> <cfset TwitterConsumerKey = "ssssss"> >>> <cfset TwitterConsumerSecret = "tttttttt"> >>> <cfset Twitter = createObject("java", "twitter4j.Twitter")> >>> <cfset >>> Twitter.setOAuthConsumer(TwitterConsumerKey,TwitterConsumerSecret)> >>> <cfif structKeyExists(url,'oauth_token') IS FALSE> >>> <!--- // 2. Authorize ---> >>> <cfset RequestToken = Twitter.getOAuthRequestToken("http:// >>> myURL.com")> >>> <cfset Session.oAuthRequestToken = RequestToken.getToken()> >>> <cfset Session.oAuthRequestTokenSecret = >>> RequestToken.getTokenSecret()> >>> <cflocation url="#RequestToken.getAuthorizationURL()#" >>> addtoken="No"> >>> <cfelse> >>> <!--- // 3. Authenticate // ---> >>> <cfset AccessToken = >>> Twitter.getOAuthAccessToken(Session.oAuthRequestToken,Session.oAuthRequestT >>> okenSecret)> >>> <cfset session.StoredAccessToken = AccessToken.getToken()> >>> <cfset session.StoredAccessSecret = AccessToken.getTokenSecret()> >>> <cfset >>> Twitter.setOAuthAccessToken(Session.StoredAccessToken,Session.StoredAccessS >>> ecret)> >>> <cfset ID = Twitter.getId()> >>> <cfdump var="#session#"> >>> <cfdump var="#ID#"> >>> </cfif> >> >>> It loads fine, and brings me to the Twitter authentication screen. I >>> click "Agree" and am redirected back to my page. >> >>> When I return I am met with this error: >>> 401:Authentication credentials were missing or incorrect. <?xml >>> version="1.0" encoding="UTF-8"?> <hash> <request>/oauth/access_token</ >>> request> <error>Invalid oauth_verifier parameter</error >> >>> Any ideas? > -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk?hl=en