Searching Twitter likes using keyword - twitter

The end goal is to exclusively search my own Twitter likes using keywords.
I'm having a hard time figuring out if it's possible via the API and if so, which search that I need (Standard, Premium or Enterprise).

You cannot do it directly. Neither the advanced search nor the premium search API allow you to limit a search to "User's favourites".
The best you can do is get all your favourites using https://api.twitter.com/1.1/favorites/list.json and then search them yourself.

Related

How to filter tweets by location using Twitter API

Does Twitter still allow searching tweets by location (for tweets that have been geo-tagged)? The articles I've read describe an advanced search that no longer works the same way, so I'm thinking Twitter discontinued this capability sometime within the past year or two.
I want to filter tweets by geo location programmatically using their API. I can't find documentation on how to do this anywhere. There is one search query operator called point_radius that is exactly what I want, but it appears only accessible to "Academic Research only" projects while I've only been granted "Standard product track".

How can I search users on Twitter using multiple filters?

There are Twitter platforms like http://www.socialbro.com/ or https://manageflitter.com/ that allow you search users using filters such as genre, country, language, bio, age, profile photo...
How can they find users with these conditions? I didn't find on Twitter API documentation any method for that.
For example, if you look for "marketing" on ManageFlitter it returns us 700k users with that word in their bio. How they are getting that amount? Twitter API only returns 1000 users using search/users method.
I found there are Google commands like [site:twitter.com bio:*keyword -inurl:status] which return every user with a keyword in their bio. Are these platforms using something like this?
There isn't a way to do that with the API, which is limited on every endpoint. The only way to access this much Twitter information is via a data provider. Twitter acquired Gnip, who was one of these companies and there are others. You can subscribe to their service and get the entire history of tweets plus other value-added benefit each of them offers. Unlike the API, you'll have to pay, but the trade-off is that you receive better features and service.

Facebook Search in Graph API

I'm developing an iOS application that let the user to search for a person throught the Graph API.
What I want is the SAME behavior that it's present on the Facebook website. You know when you begin to search for a person in the top text input? The first results will be mostly your friends AND some people you MAY know or people you already looked for.
The problem? Try to use the same search pattern here to search a person: Graph Api Explorer
The Graph Api returns DIFFERENT results than the search input on the Facebook website.
Does anyone knows why? Is there a way to achieve the same results?
Facebook are using many algorithms to display search result like Relevance Indicators, Complexities of User-Centric Search and The Product.
One of the algorithm to display result on their page as below.
Personal Context:
Unlike most search engines, every Facebook search involves two key elements - a query and a querier.
Just as we need to understand the query, it’s as essential to understand the person behind the query.
People are more likely to be looking for things located in their own city/country or for people who share the same college/workplace.
We consider this information and much more when ranking results. The more we know about you, the better your search results will be.
In Graph API, they are not using this algorithm.They are just displaying the queried result. Hence you can not achieve same result using graph search API.
To achieve this you can use following apporach -
Get the friend list of user using me/friends?limit=1&offset=1
Get the user list using search api
merge both the result
show result(s) to user
For more information(approach/algorithm) you can check Intro to Facebook Search
Is there a way to achieve the same results? - NO
Does anyone knows why? - NOT REALLY
(Edit: Seems in another answer, someone does actually, but it doesn't change the answer for "If you can achieve it")
But its safe to presume that Facebook does not allow all functionality through the API, why would they after all ? They need to keep the people coming to their own platform. So I can't give you a straight forward response on WHY, but IF ? Not possible, there is zero documentation about more specified search for type user. When you request user friends, you will only get the user friends who are using the same app starting v2.0
Am afraid that you will have to drop the functionality you want to achieve.
It is not just the graph search. When you refresh your TimeLine. The order of posts gets changed every time because Facebook takes a Pull on Demand approach. Which means whenever you login, the data from your friends is fetched. Which is why facebook has a limit to maximum number of friends.
Talking about the Graph search and Graph API. They are not same and the Graph Search cannot be accessed through the Graph API. So, you would have to change your approach.
To explain why the graph search gives different results on same search term. I would guess that it follows the game Pull on Demand model ( although it is not open and we cannot know for sure ). Following that model makes sense though.
Thanks

Twitter media search

Is it possible to search through Twitter's media for specific tags?
I know you can access the media via this url:
https://twitter.com/#!/therealpaddock/media/grid
Appending media/grid to the end of a user's ID, I was wondering if there is a way to search through all the twitter media photos via a tag???
https://dev.twitter.com/docs/streaming-api/user-streams
http://dev.twitpic.com/docs/
I have been searching through the API and googling, and I can't find anything out there that does this.
I have been looking at Twitpic's API but can't seem to find anywhere that lets you search and display images.
Tag? I'm not sure you understand Twitter. A photo is simply attached to a tweet. A tweet may have a hashtag. If you want to search by hashtags, simply use the normal tweet search, then filter the photos.
Not sure why you linked to Twitpic, as what you're looking for is the normal Twitter search. https://dev.twitter.com/docs/api/1/get/search
You can look at the Twicsy API.
It allows you to search all Twitter pictures using a search term (which is what I think you mean by tag).
http://api.twicsy.com/search/foo
http://api.twicsy.com/search?q=foo
They also provide ways to filter results, by number of results and date. (Go to the API docs for more details).
Another solution would be to use the Twitter search API to make the query and parse out the images manually. This blog post explains how.

What is the best way to embed a user's tweets and mentions into a website?

I need to embed a specific user's recent tweets onto the home page of a website. The website is built in ASP.NET.
I've looked at the Twitter REST API and have tried using the user_timeline. It works but does not include mentions for the user. I want to include mentions but the only way to do it seems to be by using APIs that require authentication. I would prefer not to use authentication as it seems it would start to make things more complicated. I also do not want to get the current user to authenticate.
What is the best way to achieve this?
Use the GET search API instead. Search for statuses containing the user's #username, but in this case it will not return mentions from private/locked accounts since there's no authentication.
For example, if you want to search mentions for #stackexchange, call this.
GET http://search.twitter.com/search.json?q=#stackexchange
You could do a search for #username using the REST Search api. There's a good chance that would work :)

Resources