发布到多个 Twitter 帐户 PHP

编程入门 行业动态 更新时间:2024-10-22 19:46:59
本文介绍了发布到多个 Twitter 帐户 PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经阅读了许多关于使用 OAuth 发布到 Twitter 的教程,例如 这里 但我对某些事情仍然不清楚.

i HAVE read many Tutorials on posting to twitter using OAuth like here but i am still unclear on some things.

我的要求是通过我有用户名/密码的多个帐户发送推文.

这可能吗?如果是,那么我该怎么做?我很困惑如何获取我拥有的每个用户帐户所需的 4secret 密钥.

Is this possible ? If yes then how do i do it? I am confused how to get the 4secret keys required for each user account that i have.

推荐答案

1. PHP Class: github/themattharris/tmhOAuth

1. PHP Class: github/themattharris/tmhOAuth

2. PHP 函数

function tweet($status, $consumer_key, $consumer_secret, $user_token, $user_secret){ include("class.twitter.php"); $tmhOAuth = new tmhOAuth(array( 'consumer_key'=> $consumer_key, 'consumer_secret' => $consumer_secret, 'user_token' => $user_token, 'user_secret' => $user_secret, )); $tmhOAuth->request('POST', $tmhOAuth->url('1/statuses/update'), array( 'status' => $status )); }

3. dev.twitter/apps/new(注册一个应用,获取每个账户的密钥)

3. dev.twitter/apps/new (register an app, get keys foreach account)

4. tweet("yay!", ...);

5. 转到 4 但使用不同的键

5. goto 4 but with different keys

更多推荐

发布到多个 Twitter 帐户 PHP

本文发布于:2023-10-11 23:19:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483118.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   帐户   Twitter   PHP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!