0

Possible Duplicate:
Facebook online friend

I am using the Facebook Graph API and I was wondering if there was anyway to get a list of all the users and their current online-status (i.e Online or Offline) in one call?

Now i'm able to get list of users from Hash book Example, in that return JSONArray don't have any object related to this online-status.

EDIT: now i'm using this query for getting friends list query = "select name, current_location, uid, pic_square from user where uid in (select uid2 from friend where uid1=me()) order by name"; but i want only online friends list.

Thanks for any help!

Community
  • 1
  • 1
RajaReddy PolamReddy
  • 22,428
  • 19
  • 115
  • 166
  • Hi raja,can u help me how to get facebook online friendslis? – sandeep Nov 21 '13 at 07:28
  • @sandeep look at the answer and duplicate link . it's working for me. – RajaReddy PolamReddy Nov 21 '13 at 07:42
  • 1
    Hi raja, can u say where to use that query.iam new to this. – sandeep Nov 21 '13 at 08:10
  • like fb.query() with quesry string, search for Facebook graph api you will get some code . – RajaReddy PolamReddy Nov 21 '13 at 09:11
  • Hi,iam getting null response – sandeep Nov 21 '13 at 09:40
  • String fqlQuery = "SELECT name,uid FROM user WHERE online_presence IN ('active', 'idle') AND uid IN ( SELECT uid2 FROM friend WHERE uid1 = me())"; This is the query iam using.And i need online friends list..I have to add any permissions..Thanks in Advance – sandeep Nov 21 '13 at 10:17
  • That's fine. it will work. – RajaReddy PolamReddy Nov 21 '13 at 10:53
  • Hi raja,i have issue with online friends list.The issue is when i login with developer account(means with which i created facebook app id),then iam getting all online friends of that account,but when i logged with different account then it showing only developer acc is in online(if he was in online)and for other user its showing offline..please help me – sandeep Dec 23 '13 at 10:14

1 Answers1

0

This might help you https://stackoverflow.com/a/5669441/1458047. When you gain these rights, you should be able to access the status over fql.

along with this it requires a FQL query--- SELECT name,uid FROM user WHERE online_presence IN ('active', 'idle') AND uid IN ( SELECT uid2 FROM friend WHERE uid1 = me())

Community
  • 1
  • 1