2017 © Pedro Peláez
 

library social-feed

Get feeds from different social networks in a unified format

image

brynj-digital/social-feed

Get feeds from different social networks in a unified format

  • Thursday, July 12, 2018
  • by brynj-digital
  • Repository
  • 4 Watchers
  • 5 Stars
  • 1,460 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 12 Forks
  • 1 Open issues
  • 17 Versions
  • 27 % Grown

The README.md

SocialFeed

Get feeds from different social networks in a unified format, (*1)

Install

Use composer: composer require brynj-digital/social-feed, (*2)

Features

  • Get the most recent posts of a user
  • Get a specific item based on an ID
  • Implemented media: Twitter, Facebook, Instagram
  • Returns items in simple format
  • Gets information (id, service, thumbnail) on attached video/images from: youtube, vine, instagram, vimeo
  • Get an id from an url of a post

Example

Facebook

$feed = new SocialFeed();

// Input api credentials
$feed->facebook->setCredentials([
  'app_id' => '__',
  'app_secret' => '__'
]);

// Get all recent posts for user 'codeurs.be'
$data = $feed->facebook->getFeed('codeurs.be');
foreach ($data as $item) {
  // ...
}

// Get a single facebook post
$item = $feed->facebook->getItem('646338148755451_704084252980840');

// Get an id or item from a facebook url
$id = $feed->facebook->getIdFromUrl('https://www.facebook.com/_/photos/_/?type=1&theater');
$item = $feed->facebook->getItemFromUrl('https://www.facebook.com/_/photos/_/?type=1&theater');

Output

Output returns the following format (as a php object; printed as json for readability):, (*3)

{
  "service": "facebook",
  "text": "Example.",
  "link": "https://www.facebook.com/____",
  "id": "_",
  "created": 1428764403,
  "user": {
    "id": "_",
    "image": "https://graph.facebook.com/v2.3/_/picture/",
    "name": "_",
    "handle": null,
    "link": "https://facebook.com/profile.php?id=_"
  },
  "media": {
    "image": "https://graph.facebook.com/_/picture?type=normal",
    "video": null
  }
}

If a video is present, information will be available in media.video:, (*4)

{
  "image": null,
  "video": {
    "service": "youtube",
    "id": "_",
    "image": "http://img.youtube.com/vi/_/hqdefault.jpg"
  }
}

Credentials

The following credentials are needed depending on the medium: - Facebook: app_id, app_secret - Twitter: consumer_key, consumer_secret, access_token, access_token_secret - Instagram: client_id, client_secret, (*5)

The Versions

12/07 2018

dev-master

9999999-dev

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

by Bryn Jones

social

12/07 2018

1.0.15

1.0.15.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

by Bryn Jones

social

10/07 2018

1.0.14

1.0.14.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

by Bryn Jones

social

24/04 2018

1.0.13

1.0.13.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

by Bryn Jones

social

24/04 2018

1.0.12

1.0.12.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

by Bryn Jones

social

09/10 2015

1.0.11

1.0.11.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

25/07 2015

1.0.10

1.0.10.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

24/07 2015

1.0.9

1.0.9.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

24/07 2015

1.0.8

1.0.8.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

24/07 2015

1.0.7

1.0.7.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

24/07 2015

1.0.6

1.0.6.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

24/06 2015

1.0.5

1.0.5.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

21/04 2015

1.0.4

1.0.4.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

17/04 2015

1.0.3

1.0.3.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

17/04 2015

1.0.2

1.0.2.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

17/04 2015

1.0.1

1.0.1.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social

17/04 2015

1.0.0

1.0.0.0

Get feeds from different social networks in a unified format

  Sources   Download

MIT

The Requires

 

social