Thanks Vincent.&nbsp; You solution works great.<br><br>JD<br><br><div class="gmail_quote">On Wed, Nov 19, 2008 at 10:42 AM, vincent chu <span dir="ltr">&lt;<a href="mailto:vincentchu@gmail.com">vincentchu@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi ---<br>
<br>
I just added a &#39;get_permissions&#39; method to my FacebookUser model that<br>
queries facebook for a user&#39;s extended permissions. Your FQL query<br>
seems correct, but you have to call &#39;post&#39;, instead of &#39;fql_query&#39;:<br>
<br>
 &nbsp;def get_permissions<br>
<br>
 &nbsp; &nbsp;perms = Hash.new<br>
<br>
 &nbsp; &nbsp;begin<br>
 &nbsp; &nbsp; &nbsp;current_session = self.facebook_session<br>
 &nbsp; &nbsp; &nbsp;current_session.post(&quot;facebook.fql.query&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :query =&gt; &quot;select email, offline_access,<br>
status_update, photo_upload, create_listing, create_event, rsvp_event,<br>
sms from permissions where uid=#{self.facebook_id}&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :format =&gt; &quot;XML&quot;) do |response|<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;type = response.shift<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if (type != &quot;permissions&quot;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return perms<br>
 &nbsp; &nbsp; &nbsp; &nbsp;end<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;response.shift.map do |hash|<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hash.each_pair{|key, value| (value == &quot;1&quot; ? perms.store(key,<br>
true) : perms.store(key, false) )}<br>
 &nbsp; &nbsp; &nbsp; &nbsp;end<br>
 &nbsp; &nbsp; &nbsp;end<br>
<br>
 &nbsp; &nbsp; &nbsp;return perms<br>
<br>
 &nbsp; &nbsp;rescue<br>
 &nbsp; &nbsp; &nbsp;return nil<br>
 &nbsp; &nbsp;end<br>
<br>
 &nbsp;end<br>
<br>
<br>
Hope this helps. Cheers,<br>
<br>
Vince<br>
<br>
----<br>
Vincent Chu<br>
Department of Applied Physics<br>
Geballe Laboratory of Advanced Materials<br>
McCullough Bldg. 318<br>
476 Lomita Mall<br>
Stanford, CA, 94305<br>
<br>
vchu AT <a href="http://post.harvard.edu" target="_blank">post.harvard.edu</a><br>
vincentchu AT <a href="http://gmail.com" target="_blank">gmail.com</a><br>
<br>
<a href="http://www.stanford.edu/%7Evincentc" target="_blank">http://www.stanford.edu/~vincentc</a> (homepage, updated sporadically)<br>
<br>
Consider this:<br>
&quot;The smallest positive integer not definable in under eleven words.&quot;<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On Fri, Nov 14, 2008 at 4:43 AM, Joseph Durden &lt;<a href="mailto:josephdurden@gmail.com">josephdurden@gmail.com</a>&gt; wrote:<br>
&gt; Hello everyone,<br>
&gt;<br>
&gt; I am using fb_prompt_permission :email, &quot;Give Permission!&quot; and it is working<br>
&gt; properly. &nbsp;A user can give permission and my app can then send emails to<br>
&gt; users.<br>
&gt;<br>
&gt; I have a requirement that I have to document that a user has granted this<br>
&gt; email extended permission. &nbsp;I don&#39;t see the params for fb_sig_ext_perms =&gt;<br>
&gt; email? Why is this not showing up? &nbsp;Could this be the facebooker plugin or<br>
&gt; is it the actual <a href="http://www.facebook.com" target="_blank">www.facebook.com</a> api? &nbsp;I noticed the fb_sig_ext_perms<br>
&gt; before filters although I dont need them<br>
&gt;<br>
&gt; &nbsp; before_filter :ensure_has_status_update<br>
&gt; &nbsp; before_filter :ensure_has_photo_upload<br>
&gt; &nbsp; before_filter :ensure_has_create_listing<br>
&gt;<br>
&gt;<br>
&gt; i have tested the above out, and i properly receive the params for status,<br>
&gt; photo and create. &nbsp;How can I get the email permissions sent as a params? &nbsp;I<br>
&gt; have also tried using fql to grab the email permissions for a given user.<br>
&gt; Here is the fql:<br>
&gt;<br>
&gt;&gt;&gt; current_user.facebook_session.fql_query(&quot;select email from permissions<br>
&gt;&gt;&gt; where uid = (#{current_user.facebook_id})&quot;)<br>
&gt; =&gt; [nil]<br>
&gt;<br>
&gt; I think that my fql is working properly but not sure.<br>
&gt;<br>
&gt; If anyone knows how to get the email sent in params or how to write a fql<br>
&gt; query that can give me the params I would be extatic!<br>
&gt;<br>
&gt; Here are my params:<br>
&gt;<br>
&gt; Parameters: {&quot;fb_sig_time&quot;=&gt;&quot;1221234687.6134&quot;,<br>
&gt; &quot;fb_sig&quot;=&gt;&quot;1234gsdrgdfh4634534yhdsrt6345634&quot;, &quot;fb_sig_in_new_facebook&quot;=&gt;&quot;1&quot;,<br>
&gt; &quot;_method&quot;=&gt;&quot;GET&quot;, &quot;fb_sig_locale&quot;=&gt;&quot;en_US&quot;, &quot;action&quot;=&gt;&quot;index&quot;,<br>
&gt; &quot;fb_sig_session_key&quot;=&gt;&quot;2354sdfgew563455sgerd34-1231241244&quot;,<br>
&gt; &quot;fb_sig_position_fix&quot;=&gt;&quot;1&quot;, &quot;fb_sig_in_canvas&quot;=&gt;&quot;1&quot;,<br>
&gt; &quot;fb_sig_request_method&quot;=&gt;&quot;GET&quot;, &quot;controller&quot;=&gt;&quot;home&quot;,<br>
&gt; &quot;fb_sig_expires&quot;=&gt;&quot;123345234234&quot;, &quot;fb_sig_added&quot;=&gt;&quot;1&quot;,<br>
&gt; &quot;fb_sig_friends&quot;=&gt;&quot;1153203682,1154273529,1189153592,1209608725,1212782770&quot;,<br>
&gt; &quot;fb_sig_api_key&quot;=&gt;&quot;1sd234243235235sdgttwet2354g345tr3&quot;,<br>
&gt; &quot;fb_sig_ext_perms&quot;=&gt;&quot;status_update,photo_upload,create_listing&quot;,<br>
&gt; &quot;fb_sig_user&quot;=&gt;&quot;12342342342&quot;, &quot;fb_sig_profile_update_time&quot;=&gt;&quot;1226123330&quot;}<br>
&gt;<br>
&gt; as you can see there are no fb_sig_ext_perms.<br>
&gt;<br>
&gt; JD<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Facebooker-talk mailing list<br>
&gt; <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
&gt; <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>