是否可以使用 Zend Framework 2 获取 Twitter 趋势?
Is it possible to get Twitter trends using Zend Framework 2?
我正在使用 Zend Framework 2 并成功地使用了他们的 ZendService/Twitter/Twitter.php
class。我可以使用此服务搜索推文、主题标签等。
是否可以使用此 class 获取 Twitter 上的最新趋势?我看到 Twitter API 提供 trends/place
,但 ZF2 似乎没有提供访问任何 trends/place
信息的功能。
Twitter.php
中的有效方法类型列为:
protected $methodTypes = array(
'account',
'application',
'blocks',
'directmessages',
'favorites',
'friendships',
'search',
'statuses',
'users',
);
trends
不是有效的方法类型之一。这是否意味着无法使用此服务检索 trends
?
经过一天的研究,我认为 ZF2 的 Twitter 服务不提供从 Twitter 检索 trends/place
提要的能力。
因此我在 J7mbo/twitter-api-php 中使用 TwitterAPIExchange class(我不隶属于该项目)。使用此 class,我能够成功检索 trends/place
提要。
我正在使用 Zend Framework 2 并成功地使用了他们的 ZendService/Twitter/Twitter.php
class。我可以使用此服务搜索推文、主题标签等。
是否可以使用此 class 获取 Twitter 上的最新趋势?我看到 Twitter API 提供 trends/place
,但 ZF2 似乎没有提供访问任何 trends/place
信息的功能。
Twitter.php
中的有效方法类型列为:
protected $methodTypes = array(
'account',
'application',
'blocks',
'directmessages',
'favorites',
'friendships',
'search',
'statuses',
'users',
);
trends
不是有效的方法类型之一。这是否意味着无法使用此服务检索 trends
?
经过一天的研究,我认为 ZF2 的 Twitter 服务不提供从 Twitter 检索 trends/place
提要的能力。
因此我在 J7mbo/twitter-api-php 中使用 TwitterAPIExchange class(我不隶属于该项目)。使用此 class,我能够成功检索 trends/place
提要。