Facebook PHP SDK Get page posts

Discussion in 'Facebook API' started by Aldar, Aug 23, 2017.

  1. #1
    Hello!
    I have tried, for the past few days, tried to figure out how in the fifth non-newtonian dimension I am supposed to get the last n public posts from a facebook page via the facebook graph PHP SDK.

    I have stumbled to many corners of the SDK, and found out I need to make a FacebookRequest object that I then execute. But the object requires an Access Token... Which is where I stopped.

    The documentation... Doesn't mention which one, or where to get it. Is it a user access token, meaning someone has to log in into that automated app, or can I somehow get one programmatically, as I want to only read the publicly available posts of a webpage?

    And if so... Could you please point me to the relevant page in the documentation please?

    Thank you very much
    One nervous programmer.
     
    Aldar, Aug 23, 2017 IP
  2. Blank ™

    Blank ™ Well-Known Member

    Messages:
    223
    Likes Received:
    18
    Best Answers:
    6
    Trophy Points:
    110
    #2
    API doesn't mean that you all of a sudden will have access to everything. Of course you'll need permission (access token) from the page owner whose page you want to scrape.
     
    Blank ™, Aug 23, 2017 IP
  3. Aldar

    Aldar Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Of course, though, considering that I may as well see the page's posts without ever logging into facebook, a bot might do that too, but oh well.

    Any clues of how to do that, if I am a page owner then?
     
    Aldar, Aug 23, 2017 IP
  4. Blank ™

    Blank ™ Well-Known Member

    Messages:
    223
    Likes Received:
    18
    Best Answers:
    6
    Trophy Points:
    110
    #4
    Blank ™, Aug 23, 2017 IP