我们可以设置日期时间从网站发布新的状态到Twitter时间线吗? [英] Can we set datetime to post new status to twitter timeline from website?

查看:133
本文介绍了我们可以设置日期时间从网站发布新的状态到Twitter时间线吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有twitter api的经验?我正在开发我的网站,可以从我的网站推特状态到Twitter时间线。从现在开始,点击按钮Tweet后,新状态将发布到Twitter时间线。但是,我想将datetime设置为发布状态到twitter时间线。例如,我将datetime设置为在上午9点发布,我在上午8点点击按钮;所以在上午9点,新状态将在Twitter时间线上发布。有可能吗?



我的代码



此代码将发布新的点击按钮时的状态Tweet:



Does anyone has experiences with twitter api? I'm developing my site that can tweet status to twitter timeline from my site. Since now, a new status will post to twitter timeline after clicked on button Tweet. However, i want to set datetime to post status to twitter timeline. For example, i set datetime to post at 9AM and i click button at 8AM; so at 9AM, new status will be post in twitter timeline. Does it possible?

My code

This code will post new status when click on button Tweet:

<?php

session_start();
$message = "I want to set datetime to tweet new status";
$access_token = $_SESSION['access_token'];
$connection = new TwitterOAuth(YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);
$parameters = array('status' => $message);
$status = $connection->post('statuses/update', $parameters);

?>





任何人都可以帮我?我需要在紧急情况下解决这个问题,我已经在2周内遇到了这个问题。

以下是来自其他网站的示例流程 laterbro.com futuretweets.com



提前感谢!



Can anyone help me? I need to solve it in urgent, i got stuck with this problem around 2 weeks already.
Here are the sample flows from other websites laterbro.com or futuretweets.com

Thank in advance!

推荐答案

消息 = 我想将datetime设置为推特新状态;
message = "I want to set datetime to tweet new status";


access_token =
access_token =


_SESSION [' access_token'];
_SESSION['access_token'];


这篇关于我们可以设置日期时间从网站发布新的状态到Twitter时间线吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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