Twitter 搜索 API PHP [英] Twitter Search API Php

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

问题描述

我在 twitter api 中遇到了问题.

关于如何使用 PHP 发出经过身份验证的请求.

I am facing a problem in twitter api.

https://search.twitter.com/search.json?q=test&rpp=5&include_entities=1

I have used the above URL for getting the tweets for the given query. It worked well until yesterday. But now I have checked, this is returning empty result set.

I have surfed through the twitter api and I can't able to find the relevant api method. Please help me to achieve this. Thanks in advance.

解决方案

Your Issue

There's a bug reported here that corresponds with the issue you're having.

5 days

You literally have five days until unauthenticated requests will not function at all any more.

You now need to make authenticated requests (OAuth) using the 1.1 API, and it's nowhere near as simple as just doing a (in PHP) file_get_contents(http://search.twitter.com/ ...).

Version 1 of the twitter API has been deprecated and is being removed. Not sure how you can miss the giant warnings on the twitter dev site ;) This means simple code like the above will not work any more.

Check out this post on how to make authenticated requests using PHP.

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

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