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.

Simple 'post to Facebook page' using PHP SDK (4.0.0)

Discussion in 'Facebook API' started by gavin watson, Mar 24, 2015.

  1. #1
    Hi all,

    I appreciate that this is a little vague, but I've been over this for days and days and Facebooks 'Get Started' isn't that easy to follow, as I've seen mentioned by a few people.

    What I am looking for is a simple PHP script to post to one of my Facebook pages that I can call on via a cron job. I'm fine with getting the data to post, the cron jobs, etc... I've downloaded the PHP SDK (both 3.2.3 and 4.0.0) and really can't make anything work. I've created the App on the developers page which I know works, but I'm just failing at being able to automatically post to one of my pages.
    SEMrush
    I'd post code, but I've tried so much that I keep on going back to the drawling board each time.

    Could anyone kindly help out with some sample PHP code that uses the 4.0.0 SDK to automatically post to one of my own Facebook pages? I'm not interested in gaining users data or anything like that, just being able to call a PHP page via cron to post data to one of my own pages.

    Many thanks in advance.
     
    gavin watson, Mar 24, 2015 IP
    SEMrush