将时间跨度传递到Facebook打开图 [英] passing timespan to facebook open graph

查看:86
本文介绍了将时间跨度传递到Facebook打开图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何指定现在或过去展示我的动作的时间? 我已经尝试过-

How can I specify the time for my action to be presented in present or past? I've tried -

$facebook -> api('/me/myapp:read', 'POST', array('expires_in' => '180', 'start_time' => date('c'), 'access_token' => $this -> session -> userdata('ftoken'), 'object' => base_url() . $data['link']));

但是那不起作用-那我没有得到什么呢?

but that doesn't work - so what am I not getting?

说明 :read实际上只是我的Facebook应用程序中的操作.该帖子正在发生,并且已记录了"read"操作,问题在于它总是像

Explanation :read is actually just the action in my facebook app. The post is happening and the "read" action is getting logged, the problem is that it is always presented in "past" as in

Jakob在 http://mysite.com

而不是当前

Jakob http://mysite.com

我的问题是提交动作后3分钟内如何让Facebook呈现正在读取状态(因此'expires_in' => '180'等于180秒,等于3分钟)

My question is how I can have facebook present the status as is reading for 3 minutes after the action has been submitted (hence the 'expires_in' => '180' which is 180 seconds equal to three minutes)

推荐答案

如果现在是开始时间,最简单的方法是将"expires_in"指定为POST变量.这是一个可选参数,它将指示您的动作应保持当前时态的持续时间(以秒为单位).

If your start time is now, the easiest way is to specify "expires_in" as a POST variable. This is an optional parameter and will denote the duration (in seconds) for which your action should remain in the present tense.

文档:

expires_in(整数)

此操作之前的秒数被视为旧".来自 将动作计时到expires_in秒为止,该动作是 被认为是现在时",之后被认为是过去时" 紧张".

expires_in (integer)

The number of seconds before this action is considered "old". From the time the action until expires_in seconds have elapsed, the action is considered "present tense", and afterwards, it is considered "past tense".

expires_in是用于指定结束时间的快捷方式 在操作之间以秒为单位提供增量的更方便 开始以及何时结束.例如,当用户开始观看 电影,当您发布观看动作时,expires_in应该为长度 电影的秒数.

expires_in is a shortcut for specifying end_time when it’s more convenient to provide a delta in seconds between when an action started and when it ends. For example, when a user starts watching a movie, when you post a watch action, expires_in should be the length of the movie in seconds.

这篇关于将时间跨度传递到Facebook打开图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆