How can I use FB.ui to create unpublished post

54 views Asked by At

I have been trying to use fb.ui to create an unpublished post. Cant find any documentation for it. Is this possible with v2.8 ?

1

There are 1 answers

4
andyrandy On

I don´t think you can do it with FB.ui dialogs (and scheduling is only possible for Pages anyway), but it is possible with FB.api:

const params = {
    access_token: <pageToken>,
    published: false,
    message: 'some text',
    scheduled_publish_time: <timestamp>
};

FB.api('/<pageid>/feed', params, (response) => {
    if (response && response.error) {

    } else {

    }
});