1

I try to take the favourite count filter for a question.

I use api through R

library(stackr)
    stack_questions(11227809, site = "stackoverflow", filter = "!GeD4JB*YQqe2L")

and I try to take the filter as this way

However I receive this error

Error in !metadata$has_more : invalid argument type

Also I tested the filter in api but again it gives an empty string.

0

I assume you're doing this call:

https://api.stackexchange.com/docs/questions#order=desc&sort=activity&filter=!GeD4JB*YQqe2L&site=stackoverflow&run=true

which indeed returns an empty object, since you only selected the favorite_count field, which is part of the question object, which is only returned if you select the items field in the .wrapper. Even then, it's not very useful since you don't know the ID of the question. Also, the 'stackr' library expects a has_more field which isn't in the filter either. It's easier to take the default filter and add the favorite_count, instead of starting from a blank filter. That filter value would be !9_bDDnJE5 as the following page shows:

https://api.stackexchange.com/docs/questions#order=desc&sort=activity&filter=!9_bDDnJE5&site=stackoverflow&run=true

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .