=== Plugin Name ===
Contributors: wearelittle
Donate link: https://wearelittle.agency/
Tags: social, twitter, facebook, instagram, linkedin
Requires at least: 3.0.1
Tested up to: 3.4
Stable tag: 4.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html


== Description ==

Single Feed
This is the option you use if you want separate feeds. For example a Twitter feed on one page and Facebook feed on another.

Select what social platforms you want to use. To do this click on the tab of the platform you want to use e.g. Facebook. Then click “Show *platform name* ” and click “Save”
Go to the “General” tab. Make sure “Compiled Feed” is not ticked. Then enter the number of posts you want your feed to show in the relevant box

Compiled Feed
This is the option you use if you want a feed to contain posts from multiple platforms e.g. Facebook, Instagram and Twitter posts.

Select what social platforms you want to use. To do this click on the tab of the platform you want to use e.g. Facebook. Then click “Show *platform name* ” and click “Save”
Go to the “General” tab. Make sure “Compiled Feed” is ticked. Then enter the total number of posts you want your feed to show. If you enter 50, and you have it set to show Instagram and Facebook posts, it will show the 50 newest posts. This means it could show 50 Instagram posts and 0 Facebook posts if the Instagram posts are all newer.

Outputting the feed on page
Most of the calls for data are the same across each platform, but some differ and some platforms return different data to others. To find out what information is available for each platform, you need to look at some of the plugin files. For example, to see what information Instagram returns, go to this file - /wp-content/plugins/little-social-media-plugin/social/models/Instagram.php
Here you can see the classes used to store the returned data

Compiled Feed

Calling the function 

$mixedPosts = getAllSocialPosts();

Then loop through each post and output the bits of data you want

foreach($mixedPosts as $post) {
	//The line below is only needed if you want to check against platforms
 	$type = $post->getType();
}

If you are outputting different bits of information or want different styles for each post type (platform) then you need to query each post to check what platform it is from
	
if(strcasecmp($type, 'facebook') == 0) {
			//Output platform specific content
}

Below is a complete example of outputting Facebook and Twitter posts in a compiled feed

Single Feed
Calling the function 

$socialPosts = getSocialPosts();

Then loop through and output each post 

foreach($socialPosts['twitter'] as $tweet){
}

Below is a complete example of outputting all Twitter posts



== Installation ==

This section describes how to install the plugin and get it working.


1. Upload `little-social-media-plugin` to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Configure the plugin by going to `LITTLE Social` in the sidebar menu

== Frequently Asked Questions ==

N/A

== Upgrade Notice ==

N/A

== Screenshots ==

N/A

== Changelog ==

PHP short tags removed

