You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Vishwanath <st...@gmail.com> on 2011/07/24 15:43:06 UTC

Patch for OPENEJB-1636 ( Support wider range of hashtags + Support Retweets for ApacheTomEE twitter account )

Hi,

Made some changes to add ApacheTomEE twitter account to the retweet-tool. 

Now in RetweetTool.properties, we can configure the hashtags that would be
associated with each account by a pipe separated list like below:

# pipe separated list of hashtags
openejb.supported.hashtags=openejb|tomee
tomee.supported.hashtags=apachetomee|tomee|openjpa

To hook up with ApacheTomEE twitter account,  its just like before:

Just have to run AccessTokenGenerator.java once.
It gives a URL to visit (with ApacheTomEE twitter account logged into, in
some other tab ).
On clicking "Authorize this App" the webpage gives a pin number.
AccessTokenGenerator waits for that PIN number input. Once that pin number
is entered, it gives two tokens- consumer token and consumer secret

Those tokens should be pasted in RetweetTool.properties against the
respective keys.

retweetApp.tomee.authorizedUser.consumer.token=
retweetApp.tomee.authorizedUser.consumer.tokenSecret=

Please review the patch and if it is fine, hook up with ApacheTomEE account.


Thanks,
Vishwa

PS: Suffixed the scala-tools  repository url with a "/" in pom.xml. Was
getting a repository not found error without it. The rest of the changes in
the patch are retweet-tool related.  

--
View this message in context: http://openejb.979440.n4.nabble.com/Patch-for-OPENEJB-1636-Support-wider-range-of-hashtags-Support-Retweets-for-ApacheTomEE-twitter-acco-tp3690263p3690263.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Patch for OPENEJB-1636 ( Support wider range of hashtags + Support Retweets for ApacheTomEE twitter account )

Posted by David Blevins <da...@gmail.com>.
On Aug 24, 2011, at 2:26 PM, stratwine wrote:

> Went to the twitter account --> Settings --> Applications 
>  and hit 'Revoke Access' button on the OpenEJB-bot app.
> 
> Then ran the AccessTokenGenerator to create fresh tokens... 
> 
> It worked fine then :)
> 

Very excellent.  Applied that patch and hopefully we should start seeing some good tweets flowing through!

If you're still having fun hacking on this, one more idea for you.  On the days that Twitter gets overloaded and goes down, we lose any tweets that happend before it went down or that managed to sneak through in the "over capacity" time.  By the time twitter comes back up, all these tweets fall into the "older than an hour" range and we don't retweet them.

I wonder if we could check the last few tweets of each account (@OpenEJB, @ApacheTomEE) and use that to determine what has already been retweeted?

Made a JIRA for it in case you feel like hacking:

  https://issues.apache.org/jira/browse/OPENEJB-1655

Thanks again for all the twitter work, it's beyond useful!  How lucky is OpenEJB to have you contributing! :)


-David


Re: Patch for OPENEJB-1636 ( Support wider range of hashtags + Support Retweets for ApacheTomEE twitter account )

Posted by stratwine <to...@gmail.com>.
Went to the twitter account --> Settings --> Applications 
  and hit 'Revoke Access' button on the OpenEJB-bot app.

Then ran the AccessTokenGenerator to create fresh tokens... 

It worked fine then :)

Please take authTokens.patch file ( 
https://issues.apache.org/jira/secure/attachment/12491552/authTokens.patch
https://issues.apache.org/jira/secure/attachment/12491552/authTokens.patch 
)

-Vishwa

--
View this message in context: http://openejb.979440.n4.nabble.com/Patch-for-OPENEJB-1636-Support-wider-range-of-hashtags-Support-Retweets-for-ApacheTomEE-twitter-acco-tp3690263p3766709.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Patch for OPENEJB-1636 ( Support wider range of hashtags + Support Retweets for ApacheTomEE twitter account )

Posted by stratwine <to...@gmail.com>.
David Blevins-2 wrote:
> 
> 
> I hooked it up but I think I might have broken something.  Tried a tweet
> with #TomEE in it and then ran the tool and it didn't work.  Going to send
> you the twitter account info offline and maybe you can take a stab at
> setting it up and sending a patch for the right tokens and such.  You
> might have to re-auth both accounts 
> 
> 


Oh sure, send me the account info.. let me check.

Vishwa

--
View this message in context: http://openejb.979440.n4.nabble.com/Patch-for-OPENEJB-1636-Support-wider-range-of-hashtags-Support-Retweets-for-ApacheTomEE-twitter-acco-tp3690263p3737915.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Patch for OPENEJB-1636 ( Support wider range of hashtags + Support Retweets for ApacheTomEE twitter account )

Posted by David Blevins <da...@gmail.com>.
On Jul 24, 2011, at 6:43 AM, Vishwanath wrote:

> Hi,
> 
> Made some changes to add ApacheTomEE twitter account to the retweet-tool. 
> 
> Now in RetweetTool.properties, we can configure the hashtags that would be
> associated with each account by a pipe separated list like below:
> 
> # pipe separated list of hashtags
> openejb.supported.hashtags=openejb|tomee
> tomee.supported.hashtags=apachetomee|tomee|openjpa
> 
> To hook up with ApacheTomEE twitter account,  its just like before:
> 
> Just have to run AccessTokenGenerator.java once.
> It gives a URL to visit (with ApacheTomEE twitter account logged into, in
> some other tab ).
> On clicking "Authorize this App" the webpage gives a pin number.
> AccessTokenGenerator waits for that PIN number input. Once that pin number
> is entered, it gives two tokens- consumer token and consumer secret
> 
> Those tokens should be pasted in RetweetTool.properties against the
> respective keys.
> 
> retweetApp.tomee.authorizedUser.consumer.token=
> retweetApp.tomee.authorizedUser.consumer.tokenSecret=

I hooked it up but I think I might have broken something.  Tried a tweet with #TomEE in it and then ran the tool and it didn't work.  Going to send you the twitter account info offline and maybe you can take a stab at setting it up and sending a patch for the right tokens and such.  You might have to re-auth both accounts -- I think I really messed something up.

Thanks so much for the functionality, btw.  Wouldn't have even dared to create a second twitter account without this tool!  What a time-saver!

> PS: Suffixed the scala-tools  repository url with a "/" in pom.xml. Was
> getting a repository not found error without it. The rest of the changes in
> the patch are retweet-tool related.  

Thanks! :)


-David