简体   繁体   English

当用户使用您的应用程序发送推文时,如何使用PHP和Twitter奖励用户?

[英]How to use PHP and Twitter to reward users when they send a tweet using your application?

I've never made an application on twitter before. 我以前从未在Twitter上进行过申请。 But when I do I want to use PHP and Twitter to award users when they send a tweet using my application. 但是,当我这样做时,当用户使用我的应用程序发送推文时,我想使用PHP和Twitter来奖励用户。

So for example. 例如。

User clicks on "Tweet for bonus insert_stuff_here " link. 用户单击“ Tweet for Bonus insert_stuff_here ”链接。

User then allows app to use they're twitter. 然后,用户允许应用使用他们的推特。

~ Tweet gets posted ~ 〜发推文

PHP detects that <-- somehow? PHP检测到<-不知何故?

You want to look at the twitter API then when you post the users tweet on their behalf you can run your code at the same time to award a bonus. 您需要查看twitter API,然后当您代表用户发布用户tweet时,您可以同时运行您的代码以获取奖励。 you will need to create a twitter application and create a oAuth key. 您将需要创建一个Twitter应用程序并创建一个oAuth密钥。

https://dev.twitter.com/docs/api/1/post/statuses/update https://dev.twitter.com/docs/api/1/post/statuses/update

https://dev.twitter.com/docs/api https://dev.twitter.com/docs/api

People here aren't going to write a whole script for you when you haven't even attempted it yourself... i would suggest you do some research attempt some code, and if you get stuck then post what you have so far :-) 当您甚至自己都没有尝试过时,这里的人不会为您编写整个脚本...我建议您做一些研究尝试一些代码,如果您遇到困难,请发表到目前为止的内容:- )

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

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