Twitter的API的OAuth [英] Twitter API oAUTH

查看:166
本文介绍了Twitter的API的OAuth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了Twitter的API(OAuth的)通过本教程的http://net.tutsplus.com/tutorials/php/how-to-authenticate-users-with-twitter-oauth/ 。它的工作,我可以更新我的状态(我猜它有点共享)。我现在面临的问题是我怎么可以添加图片,几句话这个链接 $ twitteroauth->后期('状态/更新,阵列('状态'=>'你好NETTUTS + ')); 。类似Twitter的卡。

I have implemented twitter API (oAUTH) by going through this tutorial http://net.tutsplus.com/tutorials/php/how-to-authenticate-users-with-twitter-oauth/ . Its working and I can update my status (which I am guessing its kinda sharing) . The problem I am facing now is how can I add pictures , few words and a link to this $twitteroauth->post('statuses/update', array('status' => 'Hello Nettuts+'));. Something like twitter cards.

有另一种很好的教程,介绍了和demonstarte所有Twitter的API的(OAuth的)的功能

Is there another good tutorial which explains and demonstarte all the functions of Twitter API (oAUTH).

感谢。 :)

推荐答案

您可以包括你已经包括换句话说(你好NETTUTS +)以同样的方式链接/ URL在你的状态更新。

You can include a link/URL in your status update in the same way that you have included the other words (Hello Nettuts+).

但是,你不能以这种方式添加图片 - 你需要使用状态/ update_with_media 相对于状态/更新端点您使用的是在现有的code端点。您可以通过阅读Twitter的API文档了解如何做到这一点:

However, you cannot add pictures in this manner - you will need to use the statuses/update_with_media endpoint as opposed to the statuses/update endpoint that you are using in your existing code. You can learn more about how to do this by reading Twitter's API documentation:

https://dev.twitter.com/docs/api/ 1.1 /后/状态/ update_with_media

你可以看到一些例如code位置:

And you can see some example code here:

https://dev.twitter.com/discussions/1059

这篇关于Twitter的API的OAuth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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