How do I create a Facebook Open Graph action on the Timeline which lies in the future?

714 Views Asked by At

I know I can create an action in the present and in the past. But is it possible to create one which lies in the future? For example I would like the users of my app to be able to make an appointment in a restaurant via the timeline for the next day. I have tried the following code:

function postRestaurant() {
    FB.api('me/APP_NAMESPACE:have_lunch?\
    start_time=2011-12-12T04:00:00&\
    expires_in=7200&\
    restaurant=' + encodeURIComponent(getRedirectURI() + '?type=restaurant' + '&description=dynamicdescription' + '&title=dynamictitle'), 'post', function (response) {
        if (!response || response.error) {
            console.log('postRestaurant: Error occured => ' + response.error.message);
        } else {
            console.log('postRestaurant: Post was successful! Action ID: ' + response.id);
        }
    });
}

With this code I can create an action in the present and it also works when creating the action in the past, but it doesn't want to create the action in the future. When I set a start_time which lies in the future I always end up with an action on my timeline which has already happened just now: Lego had lunch at... So now I am wandering whether it is even possible? I haven't found any info on that matter in the documentation. Maybe you have?

1

There are 1 best solutions below

0
On BEST ANSWER

AFAIK it is not possible. The documentation page for facebook open graph actions has a section which tells about possible configuration of timestamps:

Action’s timestamps can be configured to describe actions that occur at different times and how actions appear on the user's profile and News Feed.

Supported configurations for timestamps are:

  • Point in time when the API call is made (default. example: voted for a poll)
  • Start in the past / end in the past (example: soccer team I played on last summer)
  • Start in the past / end in the future (example: courses a student takes over a semester
  • Start now / end in the future (example: a relationship status)
  • Start now / end indefinite (example: like or want actions)