For statuses/mentions, I need to authenticate as a user. I want to see the user's mentions without asking him/her to authenticate. If the tweets are public, what are the mentions not public ?
I'm writing to do this
Check the Twitter search API
https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html
To find all user mentions: just use #username as search term.
I would like to add that Twitter's Search API returns only tweets from past 7 days. So if you want to retrieve ALL tweets mentioning an arbitrary user, you can't.If anyone finds a way to do this, please mention.
There is no way to get a user's mentions using the statuses/mentions endpoint because this is possible using the search api.
http://dev.twitter.com/doc/get/search
Related
Its been a while since i last used the twitter api, Using Javscript, I would like to be able to search any random twitter users feed.
On the page I would enter there Twitter username and the app would go and find the users data returned as JSON.
I'm not after the code, I would just like to know what is the best API to use for this?
Do I just need the REST API, I assume this:
https://dev.twitter.com/rest/public/search
Also, authentication do I need to authenticate my app? how should I do that if its needed?
thanks.
If you want all of my tweets (#edent) you will need to use the User Timeline API
For example:
https://dev.twitter.com/rest/reference/get/statuses/user_timeline?screen_name=edent
Yes, you will need your app to be authenticated. You will need to use OAuth
I want to see how many tweets does a link have. For Facebook, you can use FQL to get the number of Likes each page has.
Is there a page in the Twitter API documentations that describe how to do this?
This seems to work, without authentication:
http://urls.api.twitter.com/1/urls/count.json?url=example.com
For example, to get the number of tweets for this random page on mashable:
http://urls.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Fmashable.com%2F2012%2F01%2F21%2Ftop-10-tech-this-week-13
Returns the following JSON:
{"count":1204,"url":"http://mashable.com/2012/01/21/top-10-tech-this-week-13/"}
Twitter hasn't released any developer APIs for analytics based on links (assuming you're only interested in links that are wrapped by the t.co wrapper). You can look at the existing documentation but it's not very good.
I don't believe there will be any API for getting the number of tweets that link to an arbitrary url.
I'm having trouble pulling tweets onto my site. I just want to put my latest tweets on there so don't think I need a token but am not sure.
No, you don't need OAuth - check out Twitter's documentation for putting a widget on your site.
No, you can just fetch it by querying the twitter API. For example to fetch all tweets from Twitter support, visit http://api.twitter.com/1/statuses/user_timeline.json?screen_name=support
For more details, see the documentation
You can also pull the data in via RSS. Click the "RSS" link from your browser to get the URL, it's your numeric twitter id which is not posted elsewhere.
Is this possible via the API? Is there already a website that does this?
Add "filter:verified" to the search query should work.
From: http://socialmeditation.wordpress.com/2013/04/30/filter-twitter-searches-by-verified-users/
Just a thought...
I'd imagine that you can make a call to any user account and have it return all its followers, right? If this is true, then all you need to do is check against Twitter's Verified account found here: https://twitter.com/verified.
DataSift allows you to do this. It's Twitter's official partner for advanced searches.
If you are interested in using DataSift for this, here is an example live stream of Tweets from all verified Twitter users - http://datasift.com/stream/22288/tweets-from-verified-users
I need to know as to how to implement oAuth in an iphone application.
I have already gone through lot many posts but none of them shows as to How to retrieve tweets from a user profile (like we access facebook wallposts). I tried using an example named bengottlieb/Twitter-OAuth-iPhone but all it does is show the Login prompt and posts a sample Twit at my Twitter profile.
I need to make an application where
the user can view twits for a particular page (same as accessing the wall post for a Page)
Post tweets that will appear on his profile or if possible then also at the profile page for given ID
I was able to fetch the tweets for a particular id using http://search.twitter.com/search.json?ID but may be due to closing of Basic authentication it does not return to me tweets older than a specific time period.
The Twitter search API is not meant to retrieve the tweets from one particular user, even though it does seem to work (up to a certain point back in time). As far as I know the search API does not need authentication, so you're not in trouble regarding the deprecation of Basic authentication there.
To retrieve the tweets for a user, you need to retrieve their timeline. Be sure to use OAuth authentication, as indeed Basic authentication no longer works now.
Check out http://dev.twitter.com/ for more information. The API is documented quite well. You mention basic authentication, so perhaps you could start with http://dev.twitter.com/pages/basic_to_oauth to get you going?