简体   繁体   English

如何通过我的应用程序发布在用户的Twitter墙上?

[英]how to post on the user's twitter wall via my app?

I have a code, where people can post messages on the app's wall via my app 我有一个代码,人们可以在其中通过我的应用程序将消息发布到应用程序的墙上

         $consumerKey = '';
    $consumerSecret = '';
    $accessToken = '';
    $accessTokenSecret = '';

    $tweet = new TwitterOAuth($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);

    $tweetMessage = $_POST['message'];

   if(strlen($tweetMessage)<=140)
   {
       $tweet->post('statuses/update', array('status' => $tweetMessage));

       $day = date('Y-m-d H:i:s');

      mysql_query("INSERT INTO users (message,data,social) VALUES ('".$_POST['message']."','".$day."','tw')");
   }

how can I make the script to post messages from users on their own walls via my app ? 如何使脚本通过我的应用程序在自己的墙上张贴来自用户的消息?

is it possible? 可能吗?

thank you! 谢谢!

Actually, now that I think of it, what you probably want here is not a Twitter application at all. 实际上,考虑到这一点,您可能想要的根本不是Twitter应用程序。 Since you want your visitors to post messages themselves, the correct way to do this is by using Twitter Web Intents . 由于您希望访问者自己发布消息,因此正确的方法是使用Twitter Web Intents

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

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