简体   繁体   中英

Facebook open graph: How to change story tense?

I created a custom story for my facebook app and I can make a basic story post using the facebook js sdk like this

FB.api(
   'https://graph.facebook.com/me/my_app_namespace:eat',
   'post',
   {apple: 'apple_url'},
   function(response) {
     alert('finished');
   }
);

However, the resulting post is in the past tense and the object is in the singular. For instance the resulting post is very similar to

John ate an apple

but the goal is to have the resulting post be

John is eating an apple

or

John is eating apples

I have looked through the facebook open graph documentation and I have found no information on how to change the action tenses and make the objects plural or singular. How can I change the resulting post?

Just for reference:

If you want to make a facebook story to show up in present tense you should set the expires_in attribute on it.

You should assign a value to an expire_in attribute to the action. Most importantly, if you don't know when the event will end but can track it, leave the value blank and set up a callback to detect when the event is completed.

Then from your callback, assign a value of 0 to "expire_in." that will indicate to the Facebook SDK that the event is expired, and it will alter the tenses accordingly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM