get facebook page feed as json with jquery

后端 未结 3 651
广开言路
广开言路 2020-12-14 22:54

I have been trying to get facebook page feed from json data with jquery. so far I have been able to get page details with my method but when I try to get page\'s feed it giv

相关标签:
3条回答
  • 2020-12-14 23:22

    You need to use the Facebook Graph API for this to happen.

    https://developers.facebook.com/docs/reference/api/page/#feed

    Your call should change to:

    https://graph.facebook.com/237173582992285/feed?access_token=YOUR-TOKEN-GOES-HERE

    You can try use this test page and try to familiarize with the graph api.

    https://developers.facebook.com/tools/explorer/?method=GET&path=237173582992285%2Ffeed

    EDIT:

    You can also get the Wall from the page in several formats.

    JSON https://www.facebook.com/feeds/page.php?format=json&id=237173582992285

    ATOM https://www.facebook.com/feeds/page.php?format=atom10&id=237173582992285

    RSS https://www.facebook.com/feeds/page.php?format=rss20&id=237173582992285

    0 讨论(0)
  • 2020-12-14 23:23

    I just tried to like the page, and before doing that, i have opened my browser network console. Then when i hit like button, i inspected the network calls, and could figure out the page ID easily.

    0 讨论(0)
  • 2020-12-14 23:32

    Get rid of &callback=? from your URL. You have a result handler as part of your function. You don't need a callback.

    This should give you the result you are looking for, but it appears that Facebook is blocking jsfiddle via an .htaccess policy.

    0 讨论(0)
提交回复
热议问题