Published:
Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.
Since writing my original article on integrating with twitter using the twitter4j library, twitter has updated their api and the twitter4j library was subsequently updated accordingly. Here is the new code for using twitter4j version 3.0.x.
<cfset cb = createObject("Java", "twitter4j.conf.ConfigurationBuilder") />
<cfset cb.setDebugEnabled(true)>
<cfset cb.setOAuthConsumerKey("yourconsumerkey")>
<cfset cb.setOAuthConsumerSecret("yourconsumersecret")>
<cfset cb.setOAuthAccessToken("youraccesstoken")>
<cfset cb.setOAuthAccessTokenSecret("youraccesstoken secret")>
<cfset twitterFactory = createObject("Java", "twitter4j.TwitterFactory").Init(cb.build()) />
<cfset twitter = twitterFactory.getInstance()>
<cfset status = twitter.updateStatus("test")>
Reader Comments
@Gilles_Tanguay
Wednesday, October 7, 2015 at 3:29:55 PM Coordinated Universal Time
Hi,
When I try a test post, I get this error:
Error Occurred While Processing Request
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
You can see it here:
http://www.emploifeep.com/tweet/
Any hints??
Thanks
Gilles