2 ms·
The basic steps will be: 1) Hook into the post publish action in EE. 2) get the final URL and shorten it. 3) Format the tweet. 4) Post to Twitter. 1) This is E
by abraham 16y ago
The basic steps will be: 1) Hook into the post publish action in EE. 2) get the final URL and shorten it. 3) Format the tweet. 4) Post to Twitter.
1) This is EE specific and I know nothing about EE so you are on you own.
2) You can roll your own URL shortener if you want or use one with an API like http://bit.ly http://bit.ly. http://code.google.com/p/bitly-api/wiki/ApiDocumentation http://code.google.com/p/bitly-api/wiki/ApiDocumentation
3) Format the title however you want. Probably by taking the pre-formated title text, running it through EE's Markdown function, and concatenating the shortened URL to the end.
4) Finally a POST request to Twitter to create the status: http://dev.twitter.com/doc/post/statuses/update http://dev.twitter.com/doc/post/statuses/update. For this I recommend finding a OAuth library for EE as rolling your own will take time and likely won't conform the the OAuth specification. Since it will be a single account there is a shortcut to getting access tokens for the account: http://dev.twitter.com/pages/oauth_single_token http://dev.twitter.com/pages/oauth_single_token.