NAME
Mojolicious::Plugin::ShareHelpers - Mojolicious Plugin for generate share url, button and meta (Twitter, Facebook, Buzz, VKontakte)
SYNOPSIS
# Mojolicious
$self->plugin('share_helpers');
# Mojolicious::Lite
plugin 'share_helpers';
# share urls:
<a href="<%= share_url 'twitter', url => $url, text => $text, via => 'sharifulin' %>">Share to Twitter</a>
<a href="<%= share_url 'facebook', url => $url, text => $text %>">Share to Facebook</a>
<a href="<%= share_url 'buzz', url => $url, text => $text, image => $image %>">Share to Google Buzz</a>
<a href="<%= share_url 'vkontakte', url => $url %>">Share to ВКонтакте</a>
# share buttons:
%= share_button 'twitter', url => 'http://mojolicio.us', text => 'Viva la revolution!', via => 'sharifulin';
%= share_button 'facebook', url => 'http://mojolicio.us', type => 'button_count', title => 'Share it';
%= share_button 'buzz', url => 'http://mojolicio.us', text => 'Viva la revolution', image => 'http://mojolicious.org/webinabox.png', type => 'normal-count', title => 'Share it';
%= share_button 'vkontakte', url => 'http://mojolicio.us', type => 'round', title => 'Save';
# generate meta for share
%= share_meta title => 'Mojolicious', description => 'Viva la revolition!', url => 'http://mojolicio.us', image => 'http://mojolicious.org/webinabox.png'
%= share_meta title => 'Mojolicious', description => 'Viva la revolition!', url => 'http://mojolicio.us', image => 'http://mojolicious.org/webinabox.png', og => 1, fb_app_id => 1234567890, site_name => 'Site Name'
DESCRIPTION
Mojolicous::Plugin::ShareHelpers is a plugin for generate share url, share button and share meta (Twitter, Facebook, VKontakte).
Plugin adds a share_url
, share_button
, share_meta
helpers to Mojolicious.
Twitter Share http://dev.twitter.com/pages/tweet_button
Facebook Share http://developers.facebook.com/docs/share
Google Buzz Share http://www.google.com/buzz/api/admin/configPostWidget
VKontakte Share http://vkontakte.ru/pages.php?act=share
HELPERS
<%= share_url %>
Generate share url.
<%= share_button %>
Generate share button.
METHODS
Mojolicious::Plugin::ShareHelpers inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register;
Register plugin hooks in Mojolicious application.
SEE ALSO
Mojolicious, Mojolicious::Guides, http://mojolicious.org.
AUTHOR
Anatoly Sharifulin <sharifulin@gmail.com>
BUGS
Please report any bugs or feature requests to bug-mojolicious-plugin-sharehelpers at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.htMail?Queue=Mojolicious-plugin-sharehelpers. We will be notified, and then you'll automatically be notified of progress on your bug as we make changes.
Github
http://github.com/sharifulin/Mojolicious-plugin-sharehelpers/tree/master
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.htMail?Dist=Mojolicious-plugin-sharehelpers
AnnoCPAN: Annotated CPAN documentation
CPANTS: CPAN Testing Service
http://cpants.perl.org/dist/overview/Mojolicious-plugin-sharehelpers
CPAN Ratings
http://cpanratings.perl.org/d/Mojolicious-plugin-sharehelpers
Search CPAN
COPYRIGHT & LICENSE
Copyright (C) 2010 by Anatoly Sharifulin.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.