PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, March 2, 2022

[FIXED] facebook php pi fanned_pages

 March 02, 2022     facebook, facebook-graph-api, facebook-php-sdk     No comments   

Issue

I'd like to obtain a list of pages liked by a page using Facebook php api but I can't find how to do it.

You can obtain this info if you know the id of a page: https://www.facebook.com/browse/fanned_pages/?id=11...5

I've searched here but there's no mention to fanned_pages: https://developers.facebook.com/docs/graph-api/reference/page


Solution

You should be able to use

/{page_id}/likes

and not

/{page_id}?fields=likes

Compare the output of the CocaCola page

https://www.facebook.com/browse/fanned_pages/?id=40796308305

vs.

https://developers.facebook.com/tools/explorer?method=GET&path=40796308305%2Flikes&version=v2.4

See

  • https://developers.facebook.com/docs/graph-api/reference/page/likes/#Reading
  • https://developers.facebook.com/docs/graph-api/reference/v2.4/object/likes


Answered By - Tobi
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing