<?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>Hontai &#187; cakePHP</title>
	<atom:link href="http://www.hontai.es/tag/cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hontai.es</link>
	<description>Hontai? no sería mejor hentai(manga guarro)?</description>
	<lastBuildDate>Sun, 09 May 2010 19:34:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Primera aplicación para Facebook con cakePHP, posibles errores</title>
		<link>http://www.hontai.es/2009/08/primera-aplicacion-para-facebook-con-cakephp-posibles-errores/</link>
		<comments>http://www.hontai.es/2009/08/primera-aplicacion-para-facebook-con-cakephp-posibles-errores/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 13:34:10 +0000</pubDate>
		<dc:creator>n0ldor</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cakePHP]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://www.hontai.es/?p=339</guid>
		<description><![CDATA[Estos días que tengo un poco de tiempo me estoy poniendo a investigar un poco sobre como programar alguna aplicación para Facebook. Buscando tutoriales y demás me encontré con uno en la página de facebook-developers en el que explican cómo hacerlo con cakePHP (un framework de desarrollo de aplicaciones web) .
En este link podéis encontrar [...]]]></description>
			<content:encoded><![CDATA[<p>Estos días que tengo un poco de tiempo me estoy poniendo a investigar un poco sobre como programar alguna aplicación para <a href="http://www.hontai.es/tag/facebook/">Facebook</a>. Buscando tutoriales y demás me encontré con uno en la página de <a href="http://facebook-developer.net/">facebook-developers</a> en el que explican cómo hacerlo con <a href="http://cakephp.org/">cakePHP </a>(un framework de desarrollo de aplicaciones web) .</p>
<p>En <a href="http://facebook-developer.net/2007/10/18/building-your-first-facebook-application-with-cakephp/">este link</a> podéis encontrar dicho tutorial, aunque me he encontrado con un pequeño problema a la hora de intentar crear mi propia aplicación. Cuando intentaba probar si funcionaba el cakePHP me saltaba este error: Fatal error: Call to undefined function vendor()</p>
<p>Después de buscar un poco por internet me encontré con la solución, en uno de los archivos que tenemos que crear: app_controller.php, en la segunda línea tenemos que escribir:</p>
<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showPlainTxt('php-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-5">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vendor<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'facebook/facebook'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Al parecer ha cambiado la manera de importarlo por lo que ahora se tendría que escribir de la siguiente forma:</p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">App::<span style="color:#006600;">import</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Vendor'</span>, <span style="color:#FF0000;">'facebook'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Otro problema que me he encontrado a la hora de crear esta primera aplicación ha sido el tenerla alojada en un subdirectorio, dándome un error 404. El problema lo genera el htaccess que trae el cakePHP. Simplemente tendríamos que cambiar el htaccess que tenemos en la carpeta raíz del cakePHP y donde pone:</p>
<div class="igBar"><span id="lphp-7"><a href="#" onclick="javascript:showPlainTxt('php-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-7">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteEngine  on</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteRule ^$  app/webroot/     <span style="color:#006600; font-weight:bold;">&#91;</span>L<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteRule <span style="color:#006600; font-weight:bold;">&#40;</span>.*<span style="color:#006600; font-weight:bold;">&#41;</span> app/webroot/$<span style="color:#CC66CC;color:#800000;">1</span>  <span style="color:#006600; font-weight:bold;">&#91;</span>L<span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Tendriamos que poner:</p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteEngine  on</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteRule ^sub$       sub/app/webroot/     <span style="color:#006600; font-weight:bold;">&#91;</span>L<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteRule ^sub/<span style="color:#006600; font-weight:bold;">&#40;</span>.*<span style="color:#006600; font-weight:bold;">&#41;</span>$ sub/app/webroot/$<span style="color:#CC66CC;color:#800000;">1</span>  <span style="color:#006600; font-weight:bold;">&#91;</span>L<span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Bueno espero que con esto por lo menos no tengáis los mismos errores que me dieron a mí.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hontai.es/2009/08/primera-aplicacion-para-facebook-con-cakephp-posibles-errores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
