<?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>Ali Qureshi&#039;s Blog &#187; Facebook Apps Development</title>
	<atom:link href="http://www.parorrey.com/blog/category/facebook-apps-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.parorrey.com/blog</link>
	<description>random bits on web development</description>
	<lastBuildDate>Thu, 09 Sep 2010 10:45:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<atom:link rel='hub' href='http://www.parorrey.com/blog/?pushpress=hub'/>
		<item>
		<title>Facebook requires every developer to verify his Facebook account to create new applications</title>
		<link>http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/</link>
		<comments>http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 10:04:08 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Facebook Apps Development]]></category>
		<category><![CDATA[Facebook Apps]]></category>

		<guid isPermaLink="false">http://www.parorrey.com/blog/?p=140</guid>
		<description><![CDATA[While attempting to add another developer to my Facebook Application Settings panel after I tried to save his name, I got the following error: &#8220;Validation failed. Only verified developers can be added as listed developers of this application.&#8221; A Google search brings this blog post which says here http://developers.facebook.com/blog/post/386 that &#8220;Starting this week, we are [...]


Related posts:<ol><li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/' rel='bookmark' title='Permanent Link: Facebook applications will automatically upgrade to new data permissions on June 30'>Facebook applications will automatically upgrade to new data permissions on June 30</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/' rel='bookmark' title='Permanent Link: Facebook Graph API authentication OAuth 2.0 replacing Require Login'>Facebook Graph API authentication OAuth 2.0 replacing Require Login</a></li>
<li><a href='http://www.parorrey.com/blog/php-development/how-to-fix-broken-facebook-sample-application-footprints/' rel='bookmark' title='Permanent Link: How to fix broken Facebook sample application &#8216;footprints&#8217;'>How to fix broken Facebook sample application &#8216;footprints&#8217;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Ffacebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Ffacebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications%2F&amp;source=parorrey&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>While attempting to add another developer to my <strong>Facebook Application</strong> Settings panel after I tried to save his name, I got the following error:</p>
<blockquote><p>&#8220;Validation failed.</p>
<p>Only verified developers can be added as listed developers of this application.&#8221;</p></blockquote>
<p>A Google search brings this blog post which says here http://developers.facebook.com/blog/post/386 that</p>
<blockquote><p>&#8220;Starting this week, we are requiring every developer to verify his or her Facebook account to create new applications. This is the same quick process that users go through when they want to do things like upload large videos.&#8221;</p>
<p>&#8220;You can verify your account by either confirming your mobile phone or adding a credit card to your account. Facebook will not charge your credit card if you add it to your account.&#8221;</p></blockquote>
<p>Verifying mobile number did not resolve it and I suggested him to first add the application where I was adding him as developer and that worked for me. After he joined that <strong>Facebook app</strong> as a user, I could add him in the developers list.</p>
<p>Cheers!</p>
<div style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;;">
										<iframe
											style="height:25px !important; border:none !important; overflow:hidden !important; width:340px !important;" frameborder="0" scrolling="no" allowTransparency="true"
											src="http://www.linksalpha.com/social?link=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Ffacebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications%2F&fc=333333&fs=arial&fblname=like">
										</iframe>
										</div>

<p>Related posts:<ol><li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/' rel='bookmark' title='Permanent Link: Facebook applications will automatically upgrade to new data permissions on June 30'>Facebook applications will automatically upgrade to new data permissions on June 30</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/' rel='bookmark' title='Permanent Link: Facebook Graph API authentication OAuth 2.0 replacing Require Login'>Facebook Graph API authentication OAuth 2.0 replacing Require Login</a></li>
<li><a href='http://www.parorrey.com/blog/php-development/how-to-fix-broken-facebook-sample-application-footprints/' rel='bookmark' title='Permanent Link: How to fix broken Facebook sample application &#8216;footprints&#8217;'>How to fix broken Facebook sample application &#8216;footprints&#8217;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook applications will automatically upgrade to new data permissions on June 30</title>
		<link>http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/</link>
		<comments>http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 11:26:11 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Facebook Apps Development]]></category>
		<category><![CDATA[Extended Permissions]]></category>
		<category><![CDATA[Facebook Apps]]></category>
		<category><![CDATA[Graph API]]></category>

		<guid isPermaLink="false">http://www.parorrey.com/blog/?p=137</guid>
		<description><![CDATA[Starting June 30, 2010, your Facebook application will only be able to read the publically available information of a user&#8217;s profile by default, the way data read permissions are granted in the platform. While the changes are broad in scope, none of them impact backwards compatibility: all of your existing code will continue to work. [...]


Related posts:<ol><li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/' rel='bookmark' title='Permanent Link: Facebook requires every developer to verify his Facebook account to create new applications'>Facebook requires every developer to verify his Facebook account to create new applications</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/' rel='bookmark' title='Permanent Link: Facebook Graph API authentication OAuth 2.0 replacing Require Login'>Facebook Graph API authentication OAuth 2.0 replacing Require Login</a></li>
<li><a href='http://www.parorrey.com/blog/webmaster-tasks/backup-your-mysql-databases-automatically-with-cron-job/' rel='bookmark' title='Permanent Link: Backup your MySQL databases automatically with cron job'>Backup your MySQL databases automatically with cron job</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Ffacebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Ffacebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30%2F&amp;source=parorrey&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Starting June 30, 2010, your Facebook application will only be able to read the publically available information of a user&#8217;s profile by default, the way data read permissions are granted in the platform. While the changes are broad in scope, none of them impact backwards compatibility: all of your existing code will continue to work.
</p>
<p>The most important changes are:
</p>
<ul>
<li>Graph API</li>
<li>Data Permissions</li>
<li>OAuth 2.0</li>
<li>New SDKs</li>
<li>Facebook Connect Branding</li>
</ul>
<p>To <strong>get access to user&#8217;s profile information</strong>, your facebook application must explicitly request all of the data it needs to function. For instance, if you want to incorporate a user&#8217;s events into your application, you would request the user_events extended permission.During the <strong>authentication process</strong>, the user is presented with a UI in which the user can authorize your application to access that specific part of her profile.</p>
<p>Following is the <strong>complete list of extended permissions for Graph API</strong>:</p>
<p>publish_stream, create_event, rsvp_event, sms, offline_access, manage_pages, email, read_insights, read_stream, read_mailbox, ads_management, xmpp_login, user_about_me, user_activities, user_birthday, user_education_history, user_events, user_groups, user_hometown, user_interests, user_likes, user_location, user_notes, user_online_presence, user_photo_video_tags, user_photos, user_relationships, user_religion_politics, user_status, user_videos, user_website, user_work_history, read_friendlists, read_requests.</p>
<p>To upgrade your require_login()  authentication to Graph API authorization, please check my earlier post for <a href="http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/" target="_blank">how to authenticate using Facebook Graph API</a> and simply add any extended permission that you may need in your app. Go the function &#8220;RequestforPermission&#8221; in that post and add your permissions in the</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #0000ff;">'req_perms'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'email,publish_stream'</span></pre></div></div>

<p>Cheers. </p>
<div style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;;">
										<iframe
											style="height:25px !important; border:none !important; overflow:hidden !important; width:340px !important;" frameborder="0" scrolling="no" allowTransparency="true"
											src="http://www.linksalpha.com/social?link=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Ffacebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30%2F&fc=333333&fs=arial&fblname=like">
										</iframe>
										</div>

<p>Related posts:<ol><li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/' rel='bookmark' title='Permanent Link: Facebook requires every developer to verify his Facebook account to create new applications'>Facebook requires every developer to verify his Facebook account to create new applications</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/' rel='bookmark' title='Permanent Link: Facebook Graph API authentication OAuth 2.0 replacing Require Login'>Facebook Graph API authentication OAuth 2.0 replacing Require Login</a></li>
<li><a href='http://www.parorrey.com/blog/webmaster-tasks/backup-your-mysql-databases-automatically-with-cron-job/' rel='bookmark' title='Permanent Link: Backup your MySQL databases automatically with cron job'>Backup your MySQL databases automatically with cron job</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Graph API authentication OAuth 2.0 replacing Require Login</title>
		<link>http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/</link>
		<comments>http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 13:27:22 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Facebook Apps Development]]></category>
		<category><![CDATA[Facebook Apps]]></category>
		<category><![CDATA[FBML]]></category>
		<category><![CDATA[Graph API]]></category>

		<guid isPermaLink="false">http://www.parorrey.com/blog/?p=120</guid>
		<description><![CDATA[Facebook has recently introduced Graph API and simplified many things. The new Graph API attempts to drastically simplify the way developers read and write data to Facebook.The Graph API uses OAuth 2.0 for authorization. OAuth 2.0 is a simpler version of OAuth that developers used earlier for authorization as $facebook->require_login(). (by the way, old token [...]


Related posts:<ol><li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/' rel='bookmark' title='Permanent Link: Facebook applications will automatically upgrade to new data permissions on June 30'>Facebook applications will automatically upgrade to new data permissions on June 30</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/' rel='bookmark' title='Permanent Link: Facebook requires every developer to verify his Facebook account to create new applications'>Facebook requires every developer to verify his Facebook account to create new applications</a></li>
<li><a href='http://www.parorrey.com/blog/php-development/how-to-fix-broken-facebook-sample-application-footprints/' rel='bookmark' title='Permanent Link: How to fix broken Facebook sample application &#8216;footprints&#8217;'>How to fix broken Facebook sample application &#8216;footprints&#8217;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Fgraph-api-authorization-oauth-2-0-replacing-require-login%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Fgraph-api-authorization-oauth-2-0-replacing-require-login%2F&amp;source=parorrey&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Facebook has recently introduced Graph API and simplified many things.  The new Graph API attempts to drastically simplify the way developers read and write data to Facebook.The Graph API uses <strong>OAuth 2.0 for authorization</strong>. OAuth 2.0 is a simpler version of OAuth that developers used earlier for authorization as <strong>$facebook->require_login().</strong> (by the way, old token still works)</p>
<p>In the previous version, RequireLogin was a one line simple way of getting authorization for user. When I upgraded to OAuth 2.0, I had a hard time getting my user authenticated which looked like very simple thing in pre Graph API days. </p>
<p>Here is how I finally manage to put together for my latest facebook app.</p>
<p>To authenticate user in <strong>Graph API</strong>, first of all, <a href="http://github.com/facebook/php-sdk" target="_blank">download the Facebook PHP SDK</a> facebook.php and put it inside includes folder. After that, get the Application Id, API key, application secret and canvas url of your facebook app and put it inside following $fbconfig array.  </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$fbconfig</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'appid'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Application id here&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$fbconfig</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'api'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;API Key here&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$fbconfig</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'secret'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;App Secret here&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$fbconfig</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'canvas_url'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://apps.facebook.com/your_app_name/&quot;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
  try<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">include_once</span> <span style="color: #0000ff;">'includes/facebook.php'</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  catch<span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$o</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 <span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>				
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Create our Application instance.</span>
<span style="color: #000088;">$facebook</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Facebook<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
 <span style="color: #0000ff;">'appId'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$fbconfig</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'appid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
 <span style="color: #0000ff;">'secret'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$fbconfig</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'secret'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
 <span style="color: #0000ff;">'cookie'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
 <span style="color: #0000ff;">'domain'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Your Canvas Callback URL domain here&quot;</span>
  <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$session</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSession</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$session</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span> RequestforPermission<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>	<span style="color: #666666; font-style: italic;">//got session</span>
	try <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$me</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">api</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/me'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>IsApplicationUser<span style="color: #009900;">&#40;</span><span style="color: #000088;">$me</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">//InsertApplicationUser($me);</span>
            <span style="color: #666666; font-style: italic;">//create a function and insert the user info</span>
             <span style="color: #666666; font-style: italic;">//into App DB for later use</span>
	<span style="color: #009900;">&#125;</span>
          <span style="color: #009900;">&#125;</span>
 catch <span style="color: #009900;">&#40;</span>FacebookApiException <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
RequestforPermission<span style="color: #009900;">&#40;</span><span style="color: #000088;">$fbconfig</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'canvas_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Please add this function &#8220;RequestforPermission&#8221; as well in this file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> RequestforPermission<span style="color: #009900;">&#40;</span><span style="color: #000088;">$next_url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$facebook</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$loginUrl</span><span style="color: #339933;">=</span><span style="color: #000088;">$facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLoginUrl</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'canvas'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'fbconnect'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'display'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'page'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'next'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$next_url</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'cancel_url'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'http://www.facebook.com/'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'req_perms'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'email,publish_stream'</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;fb:redirect url=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$loginUrl</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
	  <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// end redirect function</span></pre></div></div>

<p>Put all this code into a file named &#8220;fb-authentication.php&#8221; and simply include &#8220;fb-authentication.php&#8221; in those files in your application where you want Facebook user authentication.</p>
<p>Hope that helps.</p>
<p>Cheers. </p>
<div style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;;">
										<iframe
											style="height:25px !important; border:none !important; overflow:hidden !important; width:340px !important;" frameborder="0" scrolling="no" allowTransparency="true"
											src="http://www.linksalpha.com/social?link=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Ffacebook-apps-development%2Fgraph-api-authorization-oauth-2-0-replacing-require-login%2F&fc=333333&fs=arial&fblname=like">
										</iframe>
										</div>

<p>Related posts:<ol><li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/' rel='bookmark' title='Permanent Link: Facebook applications will automatically upgrade to new data permissions on June 30'>Facebook applications will automatically upgrade to new data permissions on June 30</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/' rel='bookmark' title='Permanent Link: Facebook requires every developer to verify his Facebook account to create new applications'>Facebook requires every developer to verify his Facebook account to create new applications</a></li>
<li><a href='http://www.parorrey.com/blog/php-development/how-to-fix-broken-facebook-sample-application-footprints/' rel='bookmark' title='Permanent Link: How to fix broken Facebook sample application &#8216;footprints&#8217;'>How to fix broken Facebook sample application &#8216;footprints&#8217;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FBJS Quick Jump Menu for a FBML Facebook Platform App</title>
		<link>http://www.parorrey.com/blog/php-development/fbjs-quick-jump-menu-for-a-fbml-facebook-platform-app/</link>
		<comments>http://www.parorrey.com/blog/php-development/fbjs-quick-jump-menu-for-a-fbml-facebook-platform-app/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 14:30:20 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Facebook Apps Development]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Facebook Apps]]></category>
		<category><![CDATA[FBJS]]></category>
		<category><![CDATA[FBML]]></category>

		<guid isPermaLink="false">http://www.parorrey.com/blog/?p=81</guid>
		<description><![CDATA[In a FBML Facebook App, your quick jump menu will require a little tweak to work in FBJS properly. Just change your standard js jump menu from: &#60;select onchange=&#34;goto(this.options[this.selectedIndex].value)&#34;&#62; &#60;option value=&#34;page.php?id=1&#34;&#62;Page1&#60;/option&#62; &#60;option value=&#34;page.php?id=2&#34;&#62;Page2&#60;/option&#62; &#60;option value=&#34;page.php?id=3&#34;&#62;Page3&#60;/option&#62; &#60;/select&#62; To this: &#60;select onchange=&#34;document.setLocation(this.getValue());&#34;&#62; &#60;option value=&#34;page.php?id=1&#34;&#62;Page1&#60;/option&#62; &#60;option value=&#34;page.php?id=2&#34;&#62;Page2&#60;/option&#62; &#60;option value=&#34;page.php?id=3&#34;&#62;Page3&#60;/option&#62; &#60;/select&#62; Cheers. Related posts:Facebook requires every developer to verify [...]


Related posts:<ol><li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/' rel='bookmark' title='Permanent Link: Facebook requires every developer to verify his Facebook account to create new applications'>Facebook requires every developer to verify his Facebook account to create new applications</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/' rel='bookmark' title='Permanent Link: Facebook applications will automatically upgrade to new data permissions on June 30'>Facebook applications will automatically upgrade to new data permissions on June 30</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/' rel='bookmark' title='Permanent Link: Facebook Graph API authentication OAuth 2.0 replacing Require Login'>Facebook Graph API authentication OAuth 2.0 replacing Require Login</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Fphp-development%2Ffbjs-quick-jump-menu-for-a-fbml-facebook-platform-app%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Fphp-development%2Ffbjs-quick-jump-menu-for-a-fbml-facebook-platform-app%2F&amp;source=parorrey&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In a <strong>FBML Facebook App</strong>, your quick jump menu will require a little tweak to work in <strong>FBJS</strong> properly.<br />
Just change your standard js jump menu from:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>select onchange<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;goto(this.options[this.selectedIndex].value)&quot;</span><span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;page.php?id=1&quot;</span><span style="color: #339933;">&gt;</span>Page1<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;page.php?id=2&quot;</span><span style="color: #339933;">&gt;</span>Page2<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;page.php?id=3&quot;</span><span style="color: #339933;">&gt;</span>Page3<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span></pre></div></div>

<p>To this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>select onchange<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;document.setLocation(this.getValue());&quot;</span><span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;page.php?id=1&quot;</span><span style="color: #339933;">&gt;</span>Page1<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;page.php?id=2&quot;</span><span style="color: #339933;">&gt;</span>Page2<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;page.php?id=3&quot;</span><span style="color: #339933;">&gt;</span>Page3<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Cheers.</p>
<div style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;;">
										<iframe
											style="height:25px !important; border:none !important; overflow:hidden !important; width:340px !important;" frameborder="0" scrolling="no" allowTransparency="true"
											src="http://www.linksalpha.com/social?link=http%3A%2F%2Fwww.parorrey.com%2Fblog%2Fphp-development%2Ffbjs-quick-jump-menu-for-a-fbml-facebook-platform-app%2F&fc=333333&fs=arial&fblname=like">
										</iframe>
										</div>

<p>Related posts:<ol><li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-requires-every-developer-to-verify-his-facebook-account-to-create-new-applications/' rel='bookmark' title='Permanent Link: Facebook requires every developer to verify his Facebook account to create new applications'>Facebook requires every developer to verify his Facebook account to create new applications</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/facebook-applications-will-automatically-upgrade-to-new-data-permissions-on-june-30/' rel='bookmark' title='Permanent Link: Facebook applications will automatically upgrade to new data permissions on June 30'>Facebook applications will automatically upgrade to new data permissions on June 30</a></li>
<li><a href='http://www.parorrey.com/blog/facebook-apps-development/graph-api-authorization-oauth-2-0-replacing-require-login/' rel='bookmark' title='Permanent Link: Facebook Graph API authentication OAuth 2.0 replacing Require Login'>Facebook Graph API authentication OAuth 2.0 replacing Require Login</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.parorrey.com/blog/php-development/fbjs-quick-jump-menu-for-a-fbml-facebook-platform-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
