Hướn dẫn in ra tên người like bài viết và Một số API của Facebook hay
ngo Nhut Truong
2 nămBình luận: 0

Sẽ có dạng này:
https://graph.facebook. com/(id bài đăng)/reactions?fields=name&limit=1000&access_token=(token page)
Còn cách lấy token page thì là:
https://graph.facebook. com/me/accounts?fields=name,access_token&access_token=(token admin)

1: Đếm số tin nhắn đã gửi


<?php
https://graph.facebook.com/me/threads?limit=50&access_token=?>


<?php
https://graph.facebook.com/me/threads?limit=50&access_token=?>

——————————-
2: Xóa tin nhắn


<?php
https://graph.facebook.com/id_tu_api_dem_tin_nhan?access_token=&method=delete?>


<?php
https://graph.facebook.com/id_tu_api_dem_tin_nhan?access_token=&method=delete?>

——————————-
3: Lấy ds tất cả bạn bè


<?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
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=?>

——————————-
4: lấy ds ban bè bị block, faq


<?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
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=?>

——————————-
5: lấy danh sách lời mời kết bạn


&lt;?php
https://graph.facebook.com/?access_token=&amp;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})"}]&amp;include_headers=false&amp;method=post?&gt;


&lt;?php
https://graph.facebook.com/?access_token=&amp;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})"}]&amp;include_headers=false&amp;method=post?&gt;

——————————-
6: graph api search mọi người


&lt;?php
https://graph.facebook.com/search?type=user&amp;q=tu_khoa_tim_kiem&amp;limit=gioi_han_toi_da&amp;fields=id,name&amp;access_token=?&gt;


&lt;?php
https://graph.facebook.com/search?type=user&amp;q=tu_khoa_tim_kiem&amp;limit=gioi_han_toi_da&amp;fields=id,name&amp;access_token=?&gt;

——————————-
7: trang


&lt;?php
https://graph.facebook.com/search?type=page&amp;q=tu_khoa_tim_kiem&amp;limit=gioi_han_toi_da&amp;=id,name,icon&amp;access_token=?&gt;


&lt;?php
https://graph.facebook.com/search?type=page&amp;q=tu_khoa_tim_kiem&amp;limit=gioi_han_toi_da&amp;=id,name,icon&amp;access_token=?&gt;

——————————-
8: nhóm


&lt;?php
https://graph.facebook.com/search?type=group&amp;q=tu_khoa_tim_kiem&amp;limit=gioi_han_toi_da&amp;=id,name,icon&amp;access_token=?&gt;



&lt;?php
https://graph.facebook.com/search?type=group&amp;q=tu_khoa_tim_kiem&amp;limit=gioi_han_toi_da&amp;=id,name,icon&amp;access_token=?&gt;

——————————-
9: scan nhóm đang làm admin+ tham gia


&lt;?php
https://graph.facebook.com/?method=post&amp;access_token=&amp;batch=[{"method":"GET","relative_url":"me"},+{"method":"GET","relative_url":"me/groups?fields=icon,administrator,name%26limit=5000"}]&amp;include_headers=false?&gt;



&lt;?php
https://graph.facebook.com/?method=post&amp;access_token=&amp;batch=[{"method":"GET","relative_url":"me"},+{"method":"GET","relative_url":"me/groups?fields=icon,administrator,name%26limit=5000"}]&amp;include_headers=false?&gt;

——————————-
10: scan nhóm đang tham gia


&lt;?php
https://graph.facebook.com/?method=post&amp;access_token=&amp;batch=[{"method":"GET","relative_url":"me"},+{"method":"GET","relative_url":"me/groups?fields=icon,administrator,name%26limit=5000"}]&amp;include_headers=false?&gt;



&lt;?php
https://graph.facebook.com/?method=post&amp;access_token=&amp;batch=[{"method":"GET","relative_url":"me"},+{"method":"GET","relative_url":"me/groups?fields=icon,administrator,name%26limit=5000"}]&amp;include_headers=false?&gt;


——————————-
11: đếm like trang


&lt;?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)&amp;access_token=?&gt;



&lt;?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)&amp;access_token=?&gt;

——————————-
12: gửi tin nhắn theo list id


&lt;?php
https://graph.facebook.com/me/threads?locale=en_US&amp;to=[{"type":"id","id":"4","id":"4"}]&amp;method=post&amp;return_structure=true&amp;message=1&amp;link=2&amp;name=3&amp;picture=4&amp;description=5&amp;access_token=?&gt;



&lt;?php
https://graph.facebook.com/me/threads?locale=en_US&amp;to=[{"type":"id","id":"4","id":"4"}]&amp;method=post&amp;return_structure=true&amp;message=1&amp;link=2&amp;name=3&amp;picture=4&amp;description=5&amp;access_token=?&gt;

——————————-
13: mời thích trang


&lt;?php
https://graph.facebook.com/idTrang/invited?method=post&amp;invitee_id=id_can_moi&amp;access_token=?&gt;



&lt;?php
https://graph.facebook.com/idTrang/invited?method=post&amp;invitee_id=id_can_moi&amp;access_token=?&gt;

14: mời tham gia sự kiện


&lt;?php
https://graph.facebook.com/idSuKien/invited?method=post&amp;users=id_can_moi&amp;access_token=?&gt;



&lt;?php
https://graph.facebook.com/idSuKien/invited?method=post&amp;users=id_can_moi&amp;access_token=?&gt;

——————————-
15: comment tag


&lt;?php
https://graph.facebook.com/172689179864813/comments?method=post&amp;access_token=&amp;message=123+@[id_bb:0]+@[id_bb:0]?&gt;



&lt;?php
https://graph.facebook.com/172689179864813/comments?method=post&amp;access_token=&amp;message=123+@[id_bb:0]+@[id_bb:0]?&gt;

——————————-
16: share post lên tường bạn bè


&lt;?php
https://graph.facebook.com/id_bb/feed?locale=en_US&amp;method=post&amp;return_structure=true&amp;message=tin_nhan&amp;link=Link_share&amp;name=tieu_de_link&amp;picture=link_anh&amp;description=mo_ta&amp;caption=trang_muon_fake&amp;access_token=?&gt;



&lt;?php
https://graph.facebook.com/id_bb/feed?locale=en_US&amp;method=post&amp;return_structure=true&amp;message=tin_nhan&amp;link=Link_share&amp;name=tieu_de_link&amp;picture=link_anh&amp;description=mo_ta&amp;caption=trang_muon_fake&amp;access_token=?&gt;

——————————-
17:share tag bạn bè


&lt;?php
https://graph.facebook.com/me/feed?method=post&amp;access_token=&amp;message=1&amp;link=2&amp;tags=id_bb,id_bb?&gt;



&lt;?php
https://graph.facebook.com/me/feed?method=post&amp;access_token=&amp;message=1&amp;link=2&amp;tags=id_bb,id_bb?&gt;

——————————-
18: share post gr


<?php
https://graph.facebook.com/id_post_can_share/sharedposts?to=id_group&locale=e



<?php
https://graph.facebook.com/id_post_can_share/sharedposts?to=id_group&locale=e


Nguồn: Nhuttruong


Tải app Tinh tế

Tải app Tinhte - Theo dõi thông tin mà bạn yêu thích

Tải app TinhteTải app Tinhte
Tải app Tinh tế cho Android trên Google PlayTải app Tinh tế cho iPhone, iPad trên App Store





Đang theo dõi




  • Chịu trách nhiệm nội dung: Trần Mạnh Hiệp
  • © 2021 Công ty Cổ phần MXH Tinh Tế
  • Địa chỉ: 209 Đường Nam Kỳ Khởi Nghĩa, Phường 7, Quận 3, TP.HCM
  • Số điện thoại: 02862713156
  • MST: 0313255119
  • Giấy phép thiết lập MXH số 11/GP-BTTTT, Ký ngày: 08/01/2019