Jump to content
Rila_xp

Get online friends from facebook!

Recommended Posts

Posted

Ma puteti ajuta si pe mine sa preiau lista de prieteni de pe facebook prin php?

Am incercat cu apiul lor ceva de genul

<?  
$query = "SELECT name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND (online_presence = 'active' OR online_presence = 'idle')";
$url = 'http://api.facebook.com/method/fql.query?query=' . rawurlencode($query);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo($response);
?>

Dar nu am prea reusit deoarece imi trebuie autorizarea aplicatiei de catre user(adica de catre mine)si ma complic prea tare cred...

Ceva cu un post la http://www.facebook.com/ajax/chat/buddy_list.php?__a=1 cred ca ar fi bun!

Aveti vreo idee cum pot face?

Multumesc!

Posted (edited)

Eu cu api-ul lor reusesc, dar cu Graph api, nu cu FQL. Deci, sa inteleg ca vrei sa extregi lista de prieteni unui cont caruia ii ai user si pass, corect?

P.S.: Acces tokenu l-am luat asa.

LE: Apoi am vazut ca in titlu ai pus ca vrei sa iei prietenii online, asta e altceva..

Edited by em

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...