tags:

views:

35

answers:

1

Hi all, How to get the list of friend_request using facebook API. For example, user A,has logged in. Use B send request of adding friends to A Now, I want to get the friend_request of user A, how to do? May the facebook graph API could not support the operate, yes or not?

At the same time, I would like to use FQL as below, SELECT uid_from FROM friend_request WHERE uid_to=204686 (http://developers.facebook.com/docs/reference/fql/friend_request) But, how to send the FQL to facebook server?which url? like this:https://api.facebook.com/method/fql.query?query=select .... &access_token=....format=json... yes or not? any other idea? Thank you!

Simon

A: 

If you are using Java then why not use one of available Java Facebook APIs? Let API worry about which request to send where. Currently I am using RestFB API, there are plenty of examples on their site including how to execute FQL.

UPDATE

Ok, if you have to send requests manually then sending them using URL you provided is correct. Just remember that you would need to encode your FQL query before sending it as a param (URLEncoder in java would do the trick). You can play with the queries on this page and it will show you how your request should look like and what is returned.

serg
Thanks for your response, but the program was run on android platform. I'm not sure that RestFB API whether could run on android.I will study the source code of RestFB API. Maybe some useful idea found.Thank you all the same.
Simon
@Simon ok, see the update.
serg
Thank you.SELECT uid,status_id,message,time FROM status WHERE uid =100001363869440 limit 1I have queried the FQL as above, on this page(http://developers.facebook.com/docs/reference/rest/fql.query), I could get the result smooth,but in my programme on android platform, it returned empty set when I used the same FQL.
Simon
@Simon Sorry I am not familiar with Android. Maybe just create another question and someone would be able to help.
serg
Thank you all the same! The issue has been closed right now! The problem is wrong permission!~~~~:)Thank you!
Simon

related questions