<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andrei Ghioc</title>
	<atom:link href="http://andreighioc.ro/feed" rel="self" type="application/rss+xml" />
	<link>http://andreighioc.ro</link>
	<description>Web development for you</description>
	<lastBuildDate>Sun, 23 Jan 2011 12:49:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Importa pozele de pe facebook</title>
		<link>http://andreighioc.ro/importa-pozele-de-pe-facebook-by-andreighioc</link>
		<comments>http://andreighioc.ro/importa-pozele-de-pe-facebook-by-andreighioc#comments</comments>
		<pubDate>Sat, 22 Jan 2011 18:54:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[App. Facebook]]></category>

		<guid isPermaLink="false">http://andreighioc.ro/?p=103</guid>
		<description><![CDATA[Cum sa cream o aplicatie care it importa pozele de pe Facebook: Insereaza in header: &#60;div id=&#34;fb-root&#34;&#62;&#60;/div&#62; &#60;script src=&#34;http://connect.facebook.net/en_US/all.js&#34;&#62;&#60;/script&#62; &#60;script&#62; FB.init({ appId : '186633588026923', status : true, // check login status cookie : true, // enable cookies to allow the &#8230; <a href="http://andreighioc.ro/importa-pozele-de-pe-facebook-by-andreighioc">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Cum sa cream o aplicatie care it importa pozele de pe Facebook:</p>
<p>Insereaza in header:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fb-root&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://connect.facebook.net/en_US/all.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
FB.init({
appId  : '186633588026923',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml  : true  // parse XFBML
});
&nbsp;
&nbsp;
window.getAlbums = function() {
  FB.api('/me/albums', function(resp) {
&nbsp;
	var ulPC = document.getElementById('PicsFromFb');
	var iCNT = new Number(0);
	var iimgTXT = new String();
	ulPC.innerHTML = '';
    for (var i=0, l=resp.data.length; i<span style="color: #009900;">&lt;l; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #009900;">		var album <span style="color: #66cc66;">=</span> resp.<span style="color: #000066;">data</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #009900;">		iCNT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span>;</span>
&nbsp;
<span style="color: #009900;">		  FB.api<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/'</span>+album.<span style="color: #000066;">id</span>+<span style="color: #ff0000;">'/photos'</span>, function<span style="color: #66cc66;">&#40;</span>respPC<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #009900;">			<span style="color: #000066;">for</span> <span style="color: #66cc66;">&#40;</span>var iPC<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span>, lPC<span style="color: #66cc66;">=</span>respPC.<span style="color: #000066;">data</span>.length; iPC&lt;lPC; iPC++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #009900;">				var pic <span style="color: #66cc66;">=</span> respPC.<span style="color: #000066;">data</span><span style="color: #66cc66;">&#91;</span>iPC<span style="color: #66cc66;">&#93;</span>;</span>
&nbsp;
<span style="color: #009900;">				iimgTXT <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'&lt;div class=&quot;addFoto-galItem&quot; &gt;</span></span>';
				iimgTXT += '<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;addFoto-fotoHolder FbPicBox&quot;</span>&gt;</span> ';
				iimgTXT += '<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">center</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;padding: 5px;&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;' + pic.images[pic.images.length - 1].source + '&quot;</span>  <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">center</span>&gt;</span>';
				iimgTXT += '<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>';
				iCNT += 1;
				if (iCNT &gt;= 6) {
					iCNT = 0;
					iimgTXT += '<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clear&quot;</span> &gt;</span><span style="color: #808080; font-style: italic;">&lt;!-- --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>';
				}
				ulPC.innerHTML += iimgTXT;
&nbsp;
			}
&nbsp;
		  });
&nbsp;
    }
&nbsp;
  });
};
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Insereaza butonul:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;fb:login-button perms<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags&quot;</span> onlogin<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;getAlbums()&quot;</span>&gt;</span>
Importa pozele de pe Facebook
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>fb:login-button&gt;</span></pre></div></div>

<p>Inseareaza si pozitia unde doresti sa fie listate pozele.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;PicsFromFb&quot;</span> &gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://andreighioc.ro/importa-pozele-de-pe-facebook-by-andreighioc/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

