简体   繁体   English

Facebook开放图:如何改变故事时态?

[英]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 我为我的脸书应用程序创建了一个自定义故事,我可以像这样使用facebook js sdk创建一个基本的故事

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. 我查看了facebook开放图形文档,但我没有找到有关如何更改动作时态以及使对象复数或单数的信息。 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. 如果你想让facebook故事以现在时态显示,你应该在其上设置expires_in属性。

You should assign a value to an expire_in attribute to the action. 您应该为该操作的expire_in属性赋值。 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." 然后从您的回调中,将值0指定为“expire_in”。 that will indicate to the Facebook SDK that the event is expired, and it will alter the tenses accordingly. 这将向Facebook SDK表明该事件已过期,并将相应地改变时态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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