Gireesh Doddipalli
Gireesh Doddipalli

Reputation: 490

How to use display_url as a parameter in twitter api

Currently, I am passing name as a parameter and fetching the result like screen_name, location, extended_url, display_url .. etc.

My query is like this

$tweets = $twitter->get('https://api.twitter.com/1.1/users/search.json?q=ABC');

Can you please help me in passing display_url as a parameter and fetch the data from it. Like

$tweets = $twitter->get('https://api.twitter.com/1.1/users/search.json?display_url=abc.com');

If I pass my url like this, I am getting error like

stdClass Object
(
    [errors] => Array
        (
            [0] => stdClass Object
                (
                    [code] => 25
                    [message] => Query parameters are missing.
                )

        )

)

Please help me in this.Thanks in advance!

Upvotes: 1

Views: 893

Answers (1)

Joran Den Houting
Joran Den Houting

Reputation: 3163

display_url can't be used in the search API, read here:

https://dev.twitter.com/docs/api/1.1/get/search/tweets

Why not do a q= search on your website?

Upvotes: 3

Related Questions