I want to fetch the feeds which are posted by my iPhone app's users on to my twitter app.
I found this URL - http://search.twitter.com/search.json?q=serachKeyword&result_type=recent
This will return to us a dictionary result which contains an array of tweets that matches with the serachKeyword.
But i want to fetch only the feeds which are posted via my twitter app.
Is there any way to fetch only my twitter application feeds not all?
Can i filter the search results or something like it?
The Twitter API says yes, you can filter by source.
The Search Operators section says:
news source:tweet_button | containing "news" and entered via the Tweet Button
The Source section says:
• can only be combined with a keyword parameter. If you do not include a keyword you will receive an HTTP 403 error with the message: {"error":"You must enter a query."}.
• supports multi-word sources by using _ instead of spaces. For example, the source "Tweet Button" should be entered as source: tweet_button
So you must have a keyword parameter and if your client name has spaces in it replace them with underscores.
There is no complete method to do this. As #JoePasq answered you can search on source but you must include a keyword and Twitter search is filtered for quality and relevance.
Search is focused in relevance and not completeness. This means that some Tweets and users may be missing from search results.
The Search API is not complete index of all Tweets, but instead an index of recent Tweets.
What you should do is have your application post a request to a server you control every time a user posts a tweet with the status_id. This way you can store a complete database of all tweets posted from your app and query the data as needed.
Related
If we search on asana UI we get a unique url to every search. Using that url as input, through asana api can i get all tasks which were found in that url.
for eg.
Search URL : https://app.asana.com/0/search/12345678/90123456
has got 50 tasks, so through api (using some kind of input as url) can i get those 50 tasks alone?
NOTE: The search url is nothing but combinations of tags and some filters. I can do search by api searching directly through tags, but this seams little bit easy to get my searched tasks.
Please suggest if any solution.
We don't currently support sorting via the API. The URL contains an ID for the search and an ID for the task currently selected of the form "/0/search/[search id]/[task id]", so you can get the specific task easily with the API.
However, getting the results for the search via the API is not supported.
I try to get all seperate sections of a wikipedia article through the api.
I know already :
Howto retrieve a complete text :
http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvlimit=1&titles=house&rvprop=content
Howto retrieve a specific section of the text:
http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvlimit=1&titles=house&rvprop=content&rvsection=0
Howto retrieve all sections seperately with one request ? (JSON Array for example)
What you ask is called parsing, because it requires interpretation of the wikitext source to split the page by sections etc. So the solution is given in https://www.mediawiki.org/wiki/API:Parsing_wikitext
1) Get the list of sections: https://www.mediawiki.org/w/api.php?action=parse&page=API:Parsing_wikitext&prop=sections
2) Ask the parsed wikitext of that section: https://www.mediawiki.org/w/api.php?action=parse&page=API:Parsing_wikitext§ion=1&prop=text
I realize this question was asked four years ago, so possibly the following was not available then:
You can use the REST API described here: https://www.mediawiki.org/wiki/REST_API
The REST endpoints are described/documented here: https://en.wikipedia.org/api/rest_v1/#/
The mobile-sections endpoint (intended for consuming info for a mobile device) gives you a nice breakdown with headings, which sounds like what you are asking for.
Alternatively, the metadata endpoint returns a toc (table of contents) section which contains the same breakdown of headings.
Here is an example URL, fetching the mobile sections for the "Egyptian pyramids" page:
https://en.wikipedia.org/api/rest_v1/page/mobile-sections/Egyptian_pyramids
The advantage is that the response is in JSON format (which is what you were asking for).
Is there any way to search or structure a url in Google+ to get all posts that link to or reference a URL or domain? Similar to the way you can do it in Pinterest like http://pinterest.com/source/domain.com
This structured query does not get nearly everything: https://plus.google.com/u/0/s/domain.com
Google+ does not offer a specific API for getting posts that reference a specific URL or host. As Joanna mentions, you can use the activites.search method to do a full text search based on any given string, which could be a URL.
Google+ does not offer a URL that you can use to search to target specific shares. However, you can use the Google+ API to make an activities.search API call, where you can specify a query, which does a full text search. The API will return the public posts that contain the matched text.
I am developing an application and I am wondering whether there is any way to search a particular user by the give URL?
basically what I want to do is to find out the relationship between a website and twitter account, say by given domain foobar.com, the code will find out the possible twitter account for this website, say #iamowneroffoobar whose url value has been set as 'http://foobar.com' in twitter.
By checking the twitter API, https://dev.twitter.com/docs/api/1.1/get/users/search I couldn't find any way to do this, but I have already seen this feature been implemented by few other sites, anyone knows how to do this?
I don't have a direct or easy answer but you can try looking for the URL within Twitter pages using Google or Bing's Search API.
This article notes that you can Search for Twitter users based on the words used in their bio profile -
site:twitter.com intitle:”on twitter” “bio * sport”*
This will provide you with a long list of people who have used the word sport in their Twitter bio. Again, just alter the search term to suit your own needs.
See if you can adapt this search query to find URL specified in the bio of a Twitter user programmatically.
You could make your own web crawler that searches for the www.twitter.com/username link within the HTML source page. For example, search the web for top sites that index under "foobar" in the domain name, then crawl those pages for the code for their twitter button, which contains the username. I have some ideas of how to do this in Python. Mainly just what I've learned for the CS101 course on Udacity.com.
I was having this problem with multiple searches, but here is one of them:
This is the post:
https://www.facebook.com/stefsasu/posts/207104452699707
that should appear in this search:
http://graph.facebook.com/search?q=mccain%20chips&type=post&locale=en_US
Am I doing something wrong?
Even if I delete the locale, the post still isn't there...
This search:
http://graph.facebook.com/search?q=mccain%20chips&type=post&locale=en_US
will not yield all the comments in Facebook that contain "mcCain chips" but rather search facebook for Applications\Pages that contain the search term. This is equivalent for searching in the little search-box on the top of FB's pages.
If you want to search in the comments of a specific user (e.g. Jake) you should fetch https://graph.facebook.com/me/feed?access_token=
and parse the results.
If you want to parse over all of Jake's feed you need to have an access token (which you will get if Jake or one of his friend will install your app, assuming the friend has granted the appropriate permissions).
Click the links on this page for deeper insights on the Graph API:
http://developers.facebook.com/docs/reference/api/
You can search over all PUBLIC objects only...Stefan Sasu account is not public...