Hey,
I’m using this twitter4j-tutorial…
… to implement a “sign-in” to our webapp.
Well, my problem is, I store the token + tokensecret, but they aren’t avaible after the twitterlogin anymore.
I think that @Autowire isn’t working correctly?
I put this in my web.xml:
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean id="accessToken" class="com.common.MyAccessToken"/>
<bean id="oauthToken" class="com.common.OAuthToken">
<property name="consumerKey" value="mykey"/>
<property name="consumerSecret" value="mysecret"/>
</bean>
That doesn’t seem to work, since I also get a “consumer key is null”-error because of this.
For now I just put my consumer key + secret directly in the OAuthToken.java to avoid this error, but it is the same issue as the other one I think.
I hope you understand my problem.
I get a NullpointerException at the callback here…
RequestToken requestToken = new RequestToken(accessToken.getToken(), accessToken.getTokensecret());
…because Key + Secret aren’t stored in accessToken anymore, even when I stored them there at the beginning in the login-controller…
accestoken.setTokensecret(tokenSecret);
accestoken.setToken(token);
Hope someone can help me out.
Thanks in advance.