How someone using my Facebook website app can post to their pages timeline

Posted by user1334414 on Stack Overflow See other posts from Stack Overflow or by user1334414
Published on 2012-04-15T11:17:04Z Indexed on 2012/04/15 11:29 UTC
Read the original article Hit count: 263

Filed under:
|
|

I have a website where businesses create content through a PHP backend system. Each time they create a new piece of content, I want it to publish to their Facebook pages timeline (not the users timeline).

I have created the authenticate code:

<div id="fb-root"></div>
<script>
    window.fbAsyncInit = function() {
        FB.init({
            appId      : 'XXXXXXXXXX',
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true,
        });
    };
    (function(d){
        var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        d.getElementsByTagName('head')[0].appendChild(js);
    }(document));
</script>
<div class="fb-login-button" scope="manage_pages">
    Login with Facebook
</div>

With manage_pages as a scope. I need to know how they can select which page they want the post to go to (if they have more than 1 page), and also how to automatically post to that pages wall when they submit the content (which is done via a PHP form).

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook