Twitter widgets for Vaadin is a Vaadin addon that provides UI components for integrate an application with Twitter using Twitter for Websites.
Following widgets are implemented
For more information see Twitter for Websites documentation.
Try the add-on demo at https://mbf-vaadin-twitter-widgets.herokuapp.com/
Official releases of this add-on are available at Vaadin Directory. For Maven instructions, download and reviews, go to https://vaadin.com/directory#!addon/twitter-widgets-for-vaadin.
git clone https://github.com/mcollovati/vaadin-twitter-widgets
mvn clean install
cd demo
mvn jetty:run
To see the demo, navigate to http://localhost:8080/
- Single Tweet
- Follow Button
- Tweet Button
- Hashtag Button
- Mention Button
- Timeline
This component is developed as a hobby with no public roadmap or any guarantees of upcoming releases.
That said, the following features are planned for upcoming releases:
- Better widget loading
- Server side listeners for script events
- Moment
- Single Tweet with Video
- Twitter Cards
Investigation on REST and Streaming APIs are also planned.
The issues for this add-on are tracked on its github.com page. All bug reports and feature requests are appreciated.
Contributions are welcome, but there are no guarantees that they are accepted as such. Process for contributing is the following:
- Fork this project
- Create an issue to this project about the contribution (bug or feature) if there is no such issue about it already. Try to keep the scope minimal.
- Develop and test the fix or functionality carefully. Only include minimum amount of code needed to fix the issue.
- Refer to the fixed issue in commit
- Send a pull request for the original project
- Comment on the original issue that you have implemented a fix for it
Add-on is distributed under Apache License 2.0. For license terms, see LICENSE.txt.
Here is a simple example on how to try out the add-on component:
addd a dependency to your pom
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>twitter-widgets</artifactId>
<version>ENTER LATEST VERSION</version>
</dependency>
and use the component in your code
new CssLayout(
new Tweet(tweetId).withDarkTheme().withoutCards(),
TweetButton.share(url).withText("Share this!").large(),
TweetButton.hashtag("vaadin").withHashtag("vaadindirectory", "add-on"),
TweetButton.mention("vaadin").withVia("marcoc_753")
.withText("Test some twitter API")
.withRelated("twitterapi", "twitter")
);
For a more comprehensive example, see src/main/java/org/vaadin/addon/twitter/demo/DemoUI.java in demo project.
Twitter widgets for Vaadin JavaDoc is available online at https://mbf-vaadindemo.herokuapp.com/docs/twitter-widgets/api/