Sau đây mình xin chia sẻ những Graph API của Facebook cho các bạn muốn phát triển website tiện ích.
1.Đếm số tin nhắn đã gửi
2.Xóa tin nhắn
3.Lấy danh sách tất cả bạn bè
4.Lấy danh sách bạn bè bị block, faq
5.Lấy danh sách lời mời kết bạn
6.Graph api search
Mọi người
Trang
Nhóm
7.Scan nhóm đang làm admin+tham gia
8.Scan nhóm đang tham gia
PHP Code:
<?php
https://graph.facebook.com/me/threads?limit=50&access_token=?>
PHP Code:
<?php
https://graph.facebook.com/id_tu_api_dem_tin_nhan?access_token=&method=delete?>
PHP Code:
<?php
https://graph.facebook.com/fql?q=SELECT+uid,+name,+friend_count,+subscriber_count+FROM+user+WHERE+uid+IN+(SELECT+uid2+FROM+friend+WHERE+uid1+=+me())++ORDER+BY+rand()+LIMIT+5000&access_token=?>
PHP Code:
<?php
https://graph.facebook.com/fql?q=SELECT+id,+can_post,+name+FROM+profile+WHERE+id+IN+(SELECT+uid2+FROM+friend+WHERE+uid1+=+me())+AND+name+=+"Facebook+User"+ORDER+BY+rand()+LIMIT+5000&access_token=?>
PHP Code:
<?php
https://graph.facebook.com/?access_token=&batch=[{"name":+"friendrequests",+"method":"GET",+"relative_url":"v1.0/me/friendrequests?limit=5000"},+{"method":"GET",+"relative_url":"fql?q=SELECT+uid,+name,+mutual_friend_count,+sex+FROM+user+WHERE+uid+IN+({result=friendrequests:$.data[*].from.id})"}]&include_headers=false&method=post?>6.Graph api search
Mọi người
PHP Code:
<?php
https://graph.facebook.com/search?type=user&q=tu_khoa_tim_kiem&limit=gioi_han_toi_da&fields=id,name&access_token=?>
PHP Code:
<?php
https://graph.facebook.com/search?type=page&q=tu_khoa_tim_kiem&limit=gioi_han_toi_da&=id,name,icon&access_token=?>
PHP Code:
<?php
https://graph.facebook.com/search?type=group&q=tu_khoa_tim_kiem&limit=gioi_han_toi_da&=id,name,icon&access_token=?>
PHP Code:
<?php
https://graph.facebook.com/?method=post&access_token=&batch=[{"method":"GET","relative_url":"me"},+{"method":"GET","relative_url":"me/groups?fields=icon,administrator,name%26limit=5000"}]&include_headers=false?>
PHP Code:
<?php
https://graph.facebook.com/?method=post&access_token=&batch=[{"method":"GET","relative_url":"me"},+{"method":"GET","relative_url":"me/groups?fields=icon,administrator,name%26limit=5000"}]&include_headers=false?>
9.Đếm like trang
PHP Code:
<?php
https://graph.facebook.com/fql?q=SELECT+page_id,+name,+fan_count,+access_token+FROM+page+WHERE+page_id+IN+(SELECT+page_id+FROM+page_admin+WHERE+uid+=+me()+ORDER+by+rand()+LIMIT+5000)&access_token=?>

HIỆN TẠI CÓ 0 BÌNH LUẬN
Một số lưu ý khi bình luận
Mọi bình luận sai nội quy sẽ bị xóa mà không cần báo trước (xem nội quy)
Bấm Thông báo cho tôi bên dưới khung bình luận để nhận thông báo khi admin trả lời
Để bình luận một đoạn code, hãy mã hóa code trước nhé