extracts social media links for an array of links eg. twitter, facebook etc.
My first package!, (*1)
The idea is to create a nice easy way to extract the social media links from an array of links. For use in my webspider, (*2)
add, (*3)
composer require allotmentandy/socialmedialinkextractor, (*4)
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use allotmentandy\SocialMediaLinkExtractor\SocialMediaLinkExtractorController; class HomeController extends Controller { public function index() { $smle = new SocialMediaLinkExtractorController; $linkArray = ["http", "http2", "http://twitter.com/andy", "http://www.twitter.com/londiniumcom", "http://www.facebook.com"]; echo $smle->countLinks($linkArray); echo "
"; echo $smle->getTwitter($linkArray); echo "
"; echo $smle->getFacebook($linkArray); } }
Here is the full list, (*5)
$smle = new \allotmentandy\socialmedialinkextractor\SocialMediaLinkExtractorController(); echo "<h4>Social Media</h4>"; echo $smle->getTwitter($linkArray) . "<br>"; echo $smle->getFacebook($linkArray) . "<br>"; echo $smle->getYoutube($linkArray) . "<br>"; echo $smle->getInstagram($linkArray) . "<br>"; echo $smle->getLinkedin($linkArray) . "<br>"; echo $smle->getGoogle($linkArray) . "<br>"; echo $smle->getPinterest($linkArray) . "<br>"; echo $smle->getGithub($linkArray) . "<br>"; echo $smle->getFlickr($linkArray) . "<br>"; echo $smle->getTumblr($linkArray) . "<br>"; echo $smle->getTiktok($linkArray) . "<br>"; echo $smle->getRss($linkArray) . "<br>";
https://github.com/fluquid/extract-social-media/blob/master/src/extract_social_media/init.py, (*6)
https://medium.com/laravelapps/laravel-package-development-step-by-step-guide-743d9e5e076e, (*7)