<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Ten tips and tricks for writing Facebook Apps</title>
	<atom:link href="http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/feed/" rel="self" type="application/rss+xml" />
	<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/</link>
	<description>Internet Gaming, Computer Games, Technology, MMO, and Web 2.0</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:26:58 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: shivaramaraju</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-2252</link>
		<dc:creator>shivaramaraju</dc:creator>
		<pubDate>Wed, 03 Dec 2008 18:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-2252</guid>
		<description>Hi All,

          I am using this code to getting album names list.In that i am getting null value of the nodes.item(0);

  Document doc = (Document)client.photos_getAlbums(userId);
  org.w3c.dom.NodeList nodes = doc.getElementsByTagName(&quot;album&quot;);
  org.w3c.dom.Node node = nodes.item(0);
  logger.info(node.toString());

So please give me your suggession for this</description>
		<content:encoded><![CDATA[<p>Hi All,</p>
<p>          I am using this code to getting album names list.In that i am getting null value of the nodes.item(0);</p>
<p>  Document doc = (Document)client.photos_getAlbums(userId);<br />
  org.w3c.dom.NodeList nodes = doc.getElementsByTagName(&#8221;album&#8221;);<br />
  org.w3c.dom.Node node = nodes.item(0);<br />
  logger.info(node.toString());</p>
<p>So please give me your suggession for this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Primož Fideršek</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-1983</link>
		<dc:creator>Primož Fideršek</dc:creator>
		<pubDate>Mon, 15 Sep 2008 08:39:37 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-1983</guid>
		<description>Hi, 

as I can see you know alot of developing of facebook apps.

I have a question that havent been answered yet on other sites, 
and official forums.

Is there any way to retrive, user messages, news feed and wall content.
Im developing and desktop app, and without this data is my app more likely useless.

Will be very greatfull for help.
Regards</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>as I can see you know alot of developing of facebook apps.</p>
<p>I have a question that havent been answered yet on other sites,<br />
and official forums.</p>
<p>Is there any way to retrive, user messages, news feed and wall content.<br />
Im developing and desktop app, and without this data is my app more likely useless.</p>
<p>Will be very greatfull for help.<br />
Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nirmala Kolura</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-1915</link>
		<dc:creator>Nirmala Kolura</dc:creator>
		<pubDate>Fri, 08 Aug 2008 11:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-1915</guid>
		<description>Hi,

This is with reference to  “#2 - Callback URL is not a page, it’s a directory”

Let me how faceBook application will come to know which jsp page it has to call first time or when I click on my canvas URL….. my callback Url directory has 5 jsp pages…</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>This is with reference to  “#2 &#8211; Callback URL is not a page, it’s a directory”</p>
<p>Let me how faceBook application will come to know which jsp page it has to call first time or when I click on my canvas URL….. my callback Url directory has 5 jsp pages…</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Kiss</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-1846</link>
		<dc:creator>Tom Kiss</dc:creator>
		<pubDate>Thu, 26 Jun 2008 09:46:36 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-1846</guid>
		<description>I used the  tag at the top, no probs.

No idea about Java but creating a PHP based app was pretty straightforward.</description>
		<content:encoded><![CDATA[<p>I used the  tag at the top, no probs.</p>
<p>No idea about Java but creating a PHP based app was pretty straightforward.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david allen</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-1673</link>
		<dc:creator>david allen</dc:creator>
		<pubDate>Sun, 16 Mar 2008 10:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-1673</guid>
		<description>I am trying to create my first java facebook application. I am trying to retrieve a users albums. The user has albums but the call is always returning null.  The getAlbums call takes the user Id. I am getting this by calling getUserId. However, this always returns a question mark.

I would really appreciate your help. As I am stuck.
Here is my code
[code]
com.facebook.api.FacebookXmlRestClient authenticatedClient = new com.facebook.api.FacebookXmlRestClient(&quot;my_api&quot;, &quot;my_secret&quot;);
			authenticatedClient.setIsDesktop(false);
			authenticatedClient.auth_getSession(authToken);
			
			request.getSession().setAttribute( &quot;facebookClient&quot;, authenticatedClient );
			
			
			org.w3c.dom.Document document = (org.w3c.dom.Document) authenticatedClient.photos_getAlbums(new java.lang.Integer(authenticatedClient.auth_getUserId(authToken)));
			org.w3c.dom.NodeList nodes = document.getElementsByTagName(&quot;albums&quot;);
   		 	org.w3c.dom.Node node = nodes.item(0);
   	 		out.write(node.toString());
[/code]
I am working on this in  a jsp to simply get something working.</description>
		<content:encoded><![CDATA[<p>I am trying to create my first java facebook application. I am trying to retrieve a users albums. The user has albums but the call is always returning null.  The getAlbums call takes the user Id. I am getting this by calling getUserId. However, this always returns a question mark.</p>
<p>I would really appreciate your help. As I am stuck.<br />
Here is my code<br />
[code]<br />
com.facebook.api.FacebookXmlRestClient authenticatedClient = new com.facebook.api.FacebookXmlRestClient("my_api", "my_secret");<br />
			authenticatedClient.setIsDesktop(false);<br />
			authenticatedClient.auth_getSession(authToken);</p>
<p>			request.getSession().setAttribute( "facebookClient", authenticatedClient );</p>
<p>			org.w3c.dom.Document document = (org.w3c.dom.Document) authenticatedClient.photos_getAlbums(new java.lang.Integer(authenticatedClient.auth_getUserId(authToken)));<br />
			org.w3c.dom.NodeList nodes = document.getElementsByTagName("albums");<br />
   		 	org.w3c.dom.Node node = nodes.item(0);<br />
   	 		out.write(node.toString());<br />
[/code]<br />
I am working on this in  a jsp to simply get something working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-1528</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Wed, 20 Feb 2008 19:29:32 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-1528</guid>
		<description>Adam,

Keep up the good work! I&#039;ve bookmarked you and passed your site to a few of my colleagues looking to create mashups with Facebook.

Kudos!

Josh</description>
		<content:encoded><![CDATA[<p>Adam,</p>
<p>Keep up the good work! I&#8217;ve bookmarked you and passed your site to a few of my colleagues looking to create mashups with Facebook.</p>
<p>Kudos!</p>
<p>Josh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-925</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Fri, 18 Jan 2008 00:51:42 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-925</guid>
		<description>anonymouscowherd is right, the documentation really does mean style *tags* are allowed in FBML (style attributes are as well).</description>
		<content:encoded><![CDATA[<p>anonymouscowherd is right, the documentation really does mean style *tags* are allowed in FBML (style attributes are as well).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymouscowherd</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-264</link>
		<dc:creator>anonymouscowherd</dc:creator>
		<pubDate>Thu, 13 Dec 2007 13:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-264</guid>
		<description>OK, well the elements didn&#039;t show up.

The idea was this.


HEAD&gt;
   STYLE type=&quot;text/css&quot;&gt;
     H1 {border-width: 1; border: solid; text-align: center}
   /STYLE&gt;
/HEAD&gt;</description>
		<content:encoded><![CDATA[<p>OK, well the elements didn&#8217;t show up.</p>
<p>The idea was this.</p>
<p>HEAD&gt;<br />
   STYLE type=&#8221;text/css&#8221;&gt;<br />
     H1 {border-width: 1; border: solid; text-align: center}<br />
   /STYLE&gt;<br />
/HEAD&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymouscowherd</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-263</link>
		<dc:creator>anonymouscowherd</dc:creator>
		<pubDate>Thu, 13 Dec 2007 13:44:45 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-263</guid>
		<description>Maybe they meant this kind of thing:



 
   H1 {border-width: 1; border: solid; text-align: center}
 

</description>
		<content:encoded><![CDATA[<p>Maybe they meant this kind of thing:</p>
<p>   H1 {border-width: 1; border: solid; text-align: center}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rabbi</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-86</link>
		<dc:creator>Rabbi</dc:creator>
		<pubDate>Thu, 22 Nov 2007 07:50:56 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-86</guid>
		<description>Recently i have found that FacebookRestClient.notifications_sendRequest() does not exists in the new API. 
i have tried with the notifications_send() ,where the content i sent is 

&quot;Get this fabulous Game? &lt;fb:req-choice url=&#039;http://www.facebook.com/add.php?apikey=&quot; + api_key + &quot;&#039; label=&#039;Add The Application&#039; &gt; &quot;

But i dont get anything for the &lt;fb:req-choice ..&gt; tag. 

can anyone help me how can i send invitation from my java code . 

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Recently i have found that FacebookRestClient.notifications_sendRequest() does not exists in the new API.<br />
i have tried with the notifications_send() ,where the content i sent is </p>
<p>&#8220;Get this fabulous Game? &lt;fb:req-choice url=&#8217;http://www.facebook.com/add.php?apikey=&#8221; + api_key + &#8220;&#8216; label=&#8217;Add The Application&#8217; &gt; &#8221;</p>
<p>But i dont get anything for the &lt;fb:req-choice ..&gt; tag. </p>
<p>can anyone help me how can i send invitation from my java code . </p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-78</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Thu, 15 Nov 2007 16:04:44 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-78</guid>
		<description>Thanks for the tips and also thanks for the open-source facebook-java-api in:
The http://code.google.com/p/facebook-java-api/

I started working with after trying to work with the original jar and it makes all the difference in the world. The POJO approach is making the code much more readable. Not to mention all the bugs that were fixed.</description>
		<content:encoded><![CDATA[<p>Thanks for the tips and also thanks for the open-source facebook-java-api in:<br />
The <a href="http://code.google.com/p/facebook-java-api/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/http://code.google.com/p/facebook-java-api/');" rel="nofollow">http://code.google.com/p/facebook-java-api/</a></p>
<p>I started working with after trying to work with the original jar and it makes all the difference in the world. The POJO approach is making the code much more readable. Not to mention all the bugs that were fixed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adam</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-58</link>
		<dc:creator>adam</dc:creator>
		<pubDate>Mon, 29 Oct 2007 10:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-58</guid>
		<description>Thanks, that does look interesting.

I would definitely join in, except for fact that the overriding aim of the project is to be drop-in compatible with the old facebook API - this seems to me a waste of time. There is too little benefit in carrying on implementing within the strictures of an un-maintained and hacked-together API just for the sake of it.

If they were willing to make the API cleaner, I&#039;d be right there :).</description>
		<content:encoded><![CDATA[<p>Thanks, that does look interesting.</p>
<p>I would definitely join in, except for fact that the overriding aim of the project is to be drop-in compatible with the old facebook API &#8211; this seems to me a waste of time. There is too little benefit in carrying on implementing within the strictures of an un-maintained and hacked-together API just for the sake of it.</p>
<p>If they were willing to make the API cleaner, I&#8217;d be right there :).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aroth</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-55</link>
		<dc:creator>aroth</dc:creator>
		<pubDate>Sat, 27 Oct 2007 00:29:57 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-55</guid>
		<description>You may be interested in an open-source project related to fixing/improving the poorly maintained Java Facebook API:

http://code.google.com/p/facebook-java-api/

And I agree that having the Pair declared as &#039;protected&#039; essentially means that the API is broken.  It makes no sense to have a publicly exposed API call that requires as a parameter a protected data structure.  Either the API call should be declared as protected, or the data structure should be declared public.  

And of course, there was also no reason for &#039;Pair&#039; to have been nested inside of FacebookRestClient anyways.</description>
		<content:encoded><![CDATA[<p>You may be interested in an open-source project related to fixing/improving the poorly maintained Java Facebook API:</p>
<p><a href="http://code.google.com/p/facebook-java-api/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/http://code.google.com/p/facebook-java-api/');" rel="nofollow">http://code.google.com/p/facebook-java-api/</a></p>
<p>And I agree that having the Pair declared as &#8216;protected&#8217; essentially means that the API is broken.  It makes no sense to have a publicly exposed API call that requires as a parameter a protected data structure.  Either the API call should be declared as protected, or the data structure should be declared public.  </p>
<p>And of course, there was also no reason for &#8216;Pair&#8217; to have been nested inside of FacebookRestClient anyways.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adam</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-36</link>
		<dc:creator>adam</dc:creator>
		<pubDate>Sun, 30 Sep 2007 15:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-36</guid>
		<description>Perhaps that was harsher than I intended. I was trying to make it clear that some of the difficulties you face as a user of the API are not your fault, they&#039;re mistakes in the implementation. And that they&#039;re easy to fix if you don&#039;t mind editing the (free, open-source) source.

My guess is that the code was thrown together fairly quickly, passed basic &quot;Oh, I can write a class that uses this&quot; testing (sure, if you put all your classes into facebook&#039;s package, you&#039;ll be fine), and then they kindly put it up for download. Nothing wrong with that; much preferable to us all having to re-invent the wheel with our own wrappers for the REST calls.

I see your point on the version/updates issue but I doubt that&#039;s going to be a problem in practice, because Facebook&#039;s real API is the REST one, and the java &quot;API&quot; is really just a simple wrapper to that. Any changes that do happen are just going to be the addition of a new method occasionally, which will take all of a few seconds to add to the improved version.

OR...there&#039;ll be a whole new API implementation in java, with better separation into multiple classes and interfaces, in which case we&#039;ll all need to rewrite our own interfacing code anyway :).

Take it or leave it :) if it&#039;s no use to you, that&#039;s fine. For me, I *needed* to refactor this into a proper interface/class separation anyway (I&#039;ve also created a &quot;FakeFacebookClient.java&quot; implementation that fakes the authentication part and makes it easy to test without accidentally doing bad things to the FB servers; using the interface, I can swap this in and out without even having to recompile my code), so I&#039;d already taken the potential (but very small) cost of version updates, and doing some bugfixing at the same time could only be beneficial for me.</description>
		<content:encoded><![CDATA[<p>Perhaps that was harsher than I intended. I was trying to make it clear that some of the difficulties you face as a user of the API are not your fault, they&#8217;re mistakes in the implementation. And that they&#8217;re easy to fix if you don&#8217;t mind editing the (free, open-source) source.</p>
<p>My guess is that the code was thrown together fairly quickly, passed basic &#8220;Oh, I can write a class that uses this&#8221; testing (sure, if you put all your classes into facebook&#8217;s package, you&#8217;ll be fine), and then they kindly put it up for download. Nothing wrong with that; much preferable to us all having to re-invent the wheel with our own wrappers for the REST calls.</p>
<p>I see your point on the version/updates issue but I doubt that&#8217;s going to be a problem in practice, because Facebook&#8217;s real API is the REST one, and the java &#8220;API&#8221; is really just a simple wrapper to that. Any changes that do happen are just going to be the addition of a new method occasionally, which will take all of a few seconds to add to the improved version.</p>
<p>OR&#8230;there&#8217;ll be a whole new API implementation in java, with better separation into multiple classes and interfaces, in which case we&#8217;ll all need to rewrite our own interfacing code anyway :).</p>
<p>Take it or leave it :) if it&#8217;s no use to you, that&#8217;s fine. For me, I *needed* to refactor this into a proper interface/class separation anyway (I&#8217;ve also created a &#8220;FakeFacebookClient.java&#8221; implementation that fakes the authentication part and makes it easy to test without accidentally doing bad things to the FB servers; using the interface, I can swap this in and out without even having to recompile my code), so I&#8217;d already taken the potential (but very small) cost of version updates, and doing some bugfixing at the same time could only be beneficial for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Cook</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-35</link>
		<dc:creator>James Cook</dc:creator>
		<pubDate>Fri, 28 Sep 2007 23:01:57 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-35</guid>
		<description>Whilst I agree that FacebookRestClient.java is pretty bad, you cannot say it is broken just because you don&#039;t like the way they have implemented it.
My point is that just because &#039;Pair&#039; is protected does not mean it is bugged, you merely have to work around it by extending it:

public class MyFacebookRestClient extends FacebookRestClient {
    protected Logger log = Logger.getLogger(this.getClass());

    public MyFacebookRestClient(String apiKey, String secret) {
        super(apiKey, secret);
    }

    public void setUserPreference(int key, String value) throws FacebookException, IOException {
        assert (value != null);
        assert (key &gt;= 0 &amp;&amp; key (&quot;pref_id&quot;, String.valueOf(key)),
                new Pair(&quot;value&quot;, value));
    }

    public String getUserPreference(int key) throws FacebookException, IOException {
        assert (key &gt;= 0 &amp;&amp; key (&quot;pref_id&quot;, String.valueOf(key))));
        log.debug(&quot;Getting user preference: &quot; + document);
        return document.getRootElement().getTextTrim();
    }

}

However, I cannot see a way around having to edit FacebookMethod to get new methods (such as the two above) as you cannot extends Enums, this is poor design.

The problem you will face when (or if) FB release a new version is that you will have to re-implement your version of the code, whereas by extending it, you wouldn&#039;t.</description>
		<content:encoded><![CDATA[<p>Whilst I agree that FacebookRestClient.java is pretty bad, you cannot say it is broken just because you don&#8217;t like the way they have implemented it.<br />
My point is that just because &#8216;Pair&#8217; is protected does not mean it is bugged, you merely have to work around it by extending it:</p>
<p>public class MyFacebookRestClient extends FacebookRestClient {<br />
    protected Logger log = Logger.getLogger(this.getClass());</p>
<p>    public MyFacebookRestClient(String apiKey, String secret) {<br />
        super(apiKey, secret);<br />
    }</p>
<p>    public void setUserPreference(int key, String value) throws FacebookException, IOException {<br />
        assert (value != null);<br />
        assert (key &gt;= 0 &amp;&amp; key (&#8221;pref_id&#8221;, String.valueOf(key)),<br />
                new Pair(&#8221;value&#8221;, value));<br />
    }</p>
<p>    public String getUserPreference(int key) throws FacebookException, IOException {<br />
        assert (key &gt;= 0 &amp;&amp; key (&#8221;pref_id&#8221;, String.valueOf(key))));<br />
        log.debug(&#8221;Getting user preference: &#8221; + document);<br />
        return document.getRootElement().getTextTrim();<br />
    }</p>
<p>}</p>
<p>However, I cannot see a way around having to edit FacebookMethod to get new methods (such as the two above) as you cannot extends Enums, this is poor design.</p>
<p>The problem you will face when (or if) FB release a new version is that you will have to re-implement your version of the code, whereas by extending it, you wouldn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T=Machine &#187; How to Make Facebook Apps Using Java - part 2</title>
		<link>http://t-machine.org/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/comment-page-1/#comment-26</link>
		<dc:creator>T=Machine &#187; How to Make Facebook Apps Using Java - part 2</dc:creator>
		<pubDate>Fri, 21 Sep 2007 08:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/21/ten-tips-and-tricks-for-writing-facebook-apps/#comment-26</guid>
		<description>[...] 21st Sept 2007: Third part now posted  Filed under : java tutorials, [...]</description>
		<content:encoded><![CDATA[<p>[...] 21st Sept 2007: Third part now posted  Filed under : java tutorials, [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
