Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Twitter API question/issue

  • 13-04-2017 8:54am
    #1
    Registered Users, Registered Users 2 Posts: 752 ✭✭✭


    Hi All,

    I'm hoping someone can shed some light I'm having when trying to use the Twitter API.

    I am using an R script to capture tweets for a particular topic/hashtag.

    When I try the following search parameters;

    searchTwitter("#dublinbikes", n=50), this returns '50 tweets were requested but the API can only return 33'

    searchTwitter("#ryanair", n=50), this returns 50 tweets.

    I don't know why the first search is returning so few Tweets, there appears to be more than 33 tweets for Dublin bike. Is there something else I need to consider when using the API? Any tips or pointers would be much appreciated.

    TIA


Comments

  • Registered Users, Registered Users 2 Posts: 81,220 ✭✭✭✭biko


    The first request is for 50 but there are only 33 mentions, so only 33 were returned.
    Try n=25, n=30 etc to see how that works.

    It's case sensitive - try dublinbikes, Dublinbikes and DublinBikes



    For more troubleshooting, compare to twitter itself with low-count hashtags like https://twitter.com/hashtag/emeraldsweets?src=hash
    Note that twitter itself is not case sensitive.


  • Registered Users, Registered Users 2 Posts: 752 ✭✭✭illdoit2morrow


    biko wrote: »
    The first request is for 50 but there are only 33 mentions, so only 33 were returned.
    Try n=25, n=30 etc to see how that works.

    It's case sensitive - try dublinbikes, Dublinbikes and DublinBikes



    For more troubleshooting, compare to twitter itself with low-count hashtags like https://twitter.com/hashtag/emeraldsweets?src=hash
    Note that twitter itself is not case sensitive.

    Thanks for that. I've done some more reading up on the API, What i've read (https://dev.twitter.com/rest/public/search) says that it only looks at Tweets in the last seven days. I'm guessing the volumes of tweets about Dublin Bikes isn't that great. When i run the same query today i get 3 Tweets, this is with the expanded search parameter 'DublinBikes+Dublinbikes+dublinbikes'.

    This topic might not be suitable for the college work i am hoping to do.

    When i try emeraldsweets in my code, i'm getting zero tweets. When i try it on Twitter i get ten.


Advertisement