1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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.
    SEMrush
    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
    SEMrush
  2. Blank ™

    Blank ™ Well-Known Member

    Messages:
    220
    Likes Received:
    17
    Best Answers:
    5
    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:
    220
    Likes Received:
    17
    Best Answers:
    5
    Trophy Points:
    110
    #4
    Blank ™, Aug 23, 2017 IP