[Facebook] FQL & Multiquery Examples of Android SDK

  • 0
How to get mutual facebook likes between users who are using an app
SELECT page_id FROM page_fanWHERE uid= $user2 AND page_id IN(SELECT page_id FROM page_fan WHERE uid = $user1)

How to send a FQL query with the new Android SDK

String fqlQuery = "select uid, name, pic_square, is_app_user from user + 
        where uid in (select uid2 from friend where uid1 = me())";
Bundle params = new Bundle();
params.putString("q", fqlQuery);

Session session = Session.getActiveSession();
Request request = new Request(session, 
    "/fql", 
    params, 
    HttpMethod.GET, 
    new Request.Callback(){ 
        public void onCompleted(Response response) {
        Log.i(TAG, "Got results: " + response.toString());
    }
});
Request.executeBatchAsync(request);
* Multi-query
    - Multi-query | Facebook Developer
    - Getting all my family likes (fan pages) using FQL
    - FQL Multiple Query & Android SDK Example

沒有留言 :

張貼留言