Skip to content

Commit

Permalink
Merge pull request #29 from loleksy/line
Browse files Browse the repository at this point in the history
added line provider
  • Loading branch information
oscarotero authored Feb 25, 2020
2 parents c97ebc5 + c200cfe commit fc4c671
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ digg | -
email | -
evernote | -
facebook | YES
line | -
linkedin | YES
liveinternet | -
livejournal | -
Expand Down
1 change: 1 addition & 0 deletions demo/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
'email',
'evernote',
'facebook',
'line',
'linkedin',
'liveinternet',
'livejournal',
Expand Down
17 changes: 17 additions & 0 deletions src/Providers/Line.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace SocialLinks\Providers;

class Line extends ProviderBase implements ProviderInterface
{
/**
* {@inheritdoc}
*/
public function shareUrl()
{
return $this->buildUrl(
'https://social-plugins.line.me/lineit/share',
array('url')
);
}
}
1 change: 1 addition & 0 deletions tests/BasicTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function testProviders(Page $page)
$this->assertEquals($page->email->shareUrl, 'mailto:?subject=Page%20title&body=Extended%20page%20description%20%26%0Ahttp%3A%2F%2Fmypage.com');
$this->assertEquals($page->evernote->shareUrl, 'https://www.evernote.com/clip.action?url=http%3A%2F%2Fmypage.com&title=Page+title&body=Extended+page+description+%26');
$this->assertEquals($page->facebook->shareUrl, 'https://www.facebook.com/sharer/sharer.php?display=popup&redirect_uri=http%3A%2F%2Fwww.facebook.com&u=http%3A%2F%2Fmypage.com&t=Page+title');
$this->assertEquals($page->line->shareUrl, 'https://social-plugins.line.me/lineit/share?url=http%3A%2F%2Fmypage.com');
$this->assertEquals($page->linkedin->shareUrl, 'https://www.linkedin.com/shareArticle?mini=1&url=http%3A%2F%2Fmypage.com&title=Page+title&summary=Extended+page+description+%26');
$this->assertEquals($page->liveinternet->shareUrl, 'http://www.liveinternet.ru/journal_post.php?action=n_add&cnurl=http%3A%2F%2Fmypage.com&cntitle=Page+title');
$this->assertEquals($page->livejournal->shareUrl, 'http://www.livejournal.com/update.bml?event=%3Ca+href%3D%22http%3A%2F%2Fmypage.com%22%3EPage+title%3C%2Fa%3E&subject=Page+title');
Expand Down

0 comments on commit fc4c671

Please sign in to comment.