获取特定用户的推文 V1.1 [英] Get tweets for a specific user V1.1

查看:34
本文介绍了获取特定用户的推文 V1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定从哪里开始.

在升级到 API 1.1 版之前,我能够使用 XML 格式请求推文

Prior to the upgrade to version 1.1 of the API I was able to request tweets in XML format using

$url = 'http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=' . $TWITTER_USERNAME;

有几件事发生了变化,现在返回格式是 JSON,这不是问题,但我不确定如何验证我的应用以请求 JSON 格式的推文.

A couple of things have changed, the return format is now JSON which isn't a problem but I'm not sure how to authenticate my app to request the tweets in JSON format.

我已阅读此链接,但不确定我是如何阅读的我应该实施它.

I've read this link but am unsure how I'm supposed to implement it.

例如,我从哪里获得消费者秘密?

For instance, where do I get the consumer secret from ?

如何在 PHP 中请求不记名令牌?

How do I request a bearer token in PHP ?

任何指针都会很棒

推荐答案

需要使用v1.1的插件,新版本增加了安全层,需要授权才能获取推文通过 API,这里是对您有帮助的链接

you need to use plugin that is written for v1.1, In new version they have added security layer so you need to be authorized in order to get the tweets via API, here are the links that will be helpful for you

http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/ http://www.fullondesign.co.uk/coding/2516-how-use-twitter-oauth-1-1-javascriptjquery.htm

这篇关于获取特定用户的推文 V1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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