views:

97

answers:

2

I'm trying to create an android application using the facebook android SDK (http://github.com/facebook/facebook-android-sdk). I'm trying to figure out if I will be able to use FQL using this SDK. If anyone has any experiences in this regard, please let me know.

FQL can apparently be used using https://api.facebook.com/method/fql.query?query=QUERY, the facebook android SDK however doesn't seem to support this.

Thanks;

A: 

It looks like the Android Facebook SDK doesn't URL encode the params for the old REST api. So when you send a big FQL query it can't handle all the spaces and special characters. I'll probably put a fork up on github that fixes this, but in the meantime you can change line 26 in com.facebook.android.Util to:

sb.append(key + "=" + URLEncoder.encode(parameters.getString(key)));

Notice the URLEncoder call there. That's actually the deprecated version of the method but it will work fine for now, I'll include the correct one when I push to github.

Matt Hall