2017 © Pedro Peláez
 

library socialmedialinkextractor

extracts social media links for an array of links eg. twitter, facebook etc.

image

allotmentandy/socialmedialinkextractor

extracts social media links for an array of links eg. twitter, facebook etc.

  • Friday, December 29, 2017
  • by allotmentandy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SMLE - Social Media Link Extractor (smile) :)

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)

Installation

add, (*3)

composer require allotmentandy/socialmedialinkextractor, (*4)

to use with laravel

<?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>";

original idea from here

https://github.com/fluquid/extract-social-media/blob/master/src/extract_social_media/init.py, (*6)

Followed this tutorial for the basics of the package

https://medium.com/laravelapps/laravel-package-development-step-by-step-guide-743d9e5e076e, (*7)

The Versions

29/12 2017

dev-master

9999999-dev

extracts social media links for an array of links eg. twitter, facebook etc.

  Sources   Download

MIT

by Avatar allotmentandy