All Projects → drmonkeyninja → cakephp-social-share

drmonkeyninja / cakephp-social-share

Licence: MIT License
CakePHP link generator for sharing content on social networks

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to cakephp-social-share

Login With
Stateless login-with microservice for OAuth
Stars: ✭ 2,301 (+7570%)
Mutual labels:  facebook, twitter, linkedin
Hackathon Starter Kit
A Node-Typescript/Express Boilerplate with Authentication(Local, Github, Facebook, Twitter, Google, Dropbox, LinkedIn, Discord, Slack), Authorization, and CRUD functionality + PWA Support!
Stars: ✭ 242 (+706.67%)
Mutual labels:  facebook, twitter, linkedin
stay-productive
Remove feed from Facebook, Twitter and Linkedin... To stay productive !
Stars: ✭ 15 (-50%)
Mutual labels:  facebook, twitter, linkedin
Data-mining-python-script
It contain various script on web crawling/ data mining of social web(RSS,facebook,twitter,Linkedin)
Stars: ✭ 24 (-20%)
Mutual labels:  facebook, twitter, linkedin
Social Post Bundle
Symfony bundle to publish status updates on Facebook, LinkedIn and Twitter.
Stars: ✭ 35 (+16.67%)
Mutual labels:  facebook, twitter, linkedin
Social Login Helper Deprecated
A simple android library to easily implement social login into your android project
Stars: ✭ 81 (+170%)
Mutual labels:  facebook, twitter, linkedin
oauth
Allow users to log in with GitHub, Twitter, Facebook, and more!
Stars: ✭ 21 (-30%)
Mutual labels:  facebook, twitter, linkedin
Social Media Profiles Regexs
📇 Extract social media profiles and more with regular expressions
Stars: ✭ 324 (+980%)
Mutual labels:  facebook, twitter, linkedin
Yii2 Authclient
Yii 2 authclient extension.
Stars: ✭ 430 (+1333.33%)
Mutual labels:  facebook, twitter, linkedin
Keyring
Keyring is an authentication framework for WordPress. It comes with definitions for a variety of HTTP Basic, OAuth1 and OAuth2 web services. Use it as a common foundation for working with other web services from within WordPress code.
Stars: ✭ 52 (+73.33%)
Mutual labels:  facebook, twitter, linkedin
Daily Coding Problem
Series of the problem 💯 and solution ✅ asked by Daily Coding problem👨‍🎓 website.
Stars: ✭ 90 (+200%)
Mutual labels:  facebook, twitter, linkedin
Postwill
Posting to the most popular social media from Ruby
Stars: ✭ 181 (+503.33%)
Mutual labels:  facebook, twitter
Social Media Data Scripts
Stars: ✭ 188 (+526.67%)
Mutual labels:  facebook, twitter
Spark Pac4j
Security library for Sparkjava: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 154 (+413.33%)
Mutual labels:  facebook, twitter
Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (+670%)
Mutual labels:  facebook, twitter
Ngx Avatar
Universal avatar component for angular 2+ applications makes it possible to fetch / generate avatar from different sources
Stars: ✭ 210 (+600%)
Mutual labels:  facebook, twitter
social-media-profiler
Find information from Twitter, Instagram, LinkedIn and Google Search about a person.
Stars: ✭ 34 (+13.33%)
Mutual labels:  twitter, linkedin
Simplesharingbuttons
Share to Facebook, Twitter, Google+ and other social networks using simple HTML buttons.
Stars: ✭ 147 (+390%)
Mutual labels:  facebook, twitter
Pow assent
Multi-provider authentication for your Pow enabled app
Stars: ✭ 236 (+686.67%)
Mutual labels:  facebook, twitter
Swiftui Animation
SwiftUI Animation
Stars: ✭ 233 (+676.67%)
Mutual labels:  facebook, linkedin

CakePHP Social Share

Latest Stable Version License Build Status Total Downloads

This plugin provides a CakePHP View helper for creating links to share content on numerous social networks and bookmarking sites.

The aim of the plugin is to keep things simple. It doesn't come packaged with any JavaScript and I leave design decisions up to you. You can choose whether you want to use text, images, sprites or an icon font for your links.

Social Share currently supports Delicious, Digg, Evernote, Facebook, Friend Feed, Google Bookmarks, Google+, LinkedIn, Newsvine, Pinterest, Pocket, Reddit Slashdot, simple email, StumbleUpon, Technorati, Tumblr, Twitter and WhatsApp.

Note: This branch is for CakePHP 4.x.

Installation

Install using composer: composer require drmonkeyninja/cakephp-social-share:4.*

Then add the following line to your Application.php file to load the plugin.

$this->addPlugin(\SocialShare\Plugin::class);

Also don't forget to add the helper in your AppView:-

$this->loadHelper('SocialShare.SocialShare');

Usage

SocialShareHelper::link()

SocialShareHelper::link(string $service, string $title, mixed $url = null, array $options = [])

Returns an HTML link to share the current page for the supplied service. For example to create a link for Facebook:-

echo $this->SocialShare->link(
    'facebook',
    __('Share on Facebook')
);

You can easily produce a list of links to share to different social networks:-

$services = [
    'facebook' => __('Share on Facebook'),
    'gplus' => __('Share on Google+'),
    'linkedin' => __('Share on LinkedIn'),
    'twitter' => __('Share on Twitter')
];

echo '<ul>';
foreach ($services as $service => $linkText) {
    echo '<li>' . $this->SocialShare->link(
        $service,
        $linkText
    ) . '</li>';
}
echo '</ul>';

Supported services:-

  • delicious
  • digg
  • email
  • evernote
  • facebook
  • friendfeed
  • google (Google Bookmarks)
  • gplus (Google+)
  • linkedin
  • newsvine
  • pinterest
  • pocket
  • reddit
  • slashdot
  • stumbleupon
  • technorati
  • tumblr
  • twitter
  • whatsapp

You can pass a URL or a routing array as the third parameter for the URL you want to share.

$options supports the same options as HtmlHelper::link() as well as a 'text' option for a page title you want to include when sharing the URL. For Pinterest there is an additional 'image' option for a URL to an image to share.

SocialShareHelper::href()

SocialShareHelper::href(string $service, mixed $url = null, array $options = [])

Returns an URL for sharing to the supplied service.

SocialShareHelper::fa()

SocialShareHelper::fa(string $service, mixed $url = null, array $options = [])

Returns an HTML link just like SocialShare::link() except the link text will be a relevant Font Awesome icon for the service.

For example:-

echo $this->SocialShare->fa(
    'facebook',
    'http://example.com'
);

Will output:-

<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com">
    <i class="fa fa-facebook"></i>
</a>

If you need to change the icon markup output by fa() you can override the icon class using icon_class:-

echo $this->SocialShare->fa(
    'facebook',
    null,
    ['icon_class' => 'fa fa-facebook-square']
);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].