Facebook graph API not returning all mentions - api

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...

Related

Accessing full url of all page images Wikipedia API

I'm experimenting with the Wikipedia API and was trying to get the full urls for all images on a particular page, in this example Google's main page (http://en.wikipedia.org/wiki/Google).
I found the page id through the use of another API and then attempted to use this information in the following API to get the full urls of all images on that page:
http://en.wikipedia.org/w/api.php?action=query&pageids=1092923&generator=images&prop=imageinfo&iiprop=url|dimensions|mime&format=xml
I get some of the page images from this but cannot understand why I am not getting all - specifically the logo which is what I was most interested in. Apologies I am aware that there are similar questions which have been asked but I was not able to find one which would assist me here.
The API does not give you all results at once, it defaults to 10 results. You see in the beginning answer that you have a value for the parameter gimcontinue. If you use it like this you get more images: http://en.wikipedia.org/w/api.php?action=query&pageids=1092923&generator=images&prop=imageinfo&iiprop=url|dimensions|mime&format=xml&gimcontinue=1092923|Google_bike.jpg
Alternatively, you can ask for more images at once using gimlimit like this: http://en.wikipedia.org/w/api.php?action=query&pageids=1092923&generator=images&prop=imageinfo&iiprop=url|dimensions|mime&format=xml&gimlimit=500

Search for all G+ posts mentioning or linking to a domain or url?

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.

Is it possible to search twitter users by url?

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.

How to get the twitter feeds of my app only?

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.

Is it possible to retrieve Facebook Pages information like notes, photos, and videos?

I've been up and down the Facebook API as well as all over the internets looking for an answer to this question.
Has anyone seen an example of a website that displays information pulled from a Facebook Page? Is this even possible?
I've been able to run the demos provided at Trying Out Facebook Connect and the API Test Console, but I've only been able to retrieve information on users not pages.
Any help would be appreciated.
Just tried it out on the console - it does work with pages. You just have to use the page ID instead of the user ID for whatever you're trying to get.
Example:
$facebook->api_client->photos_getAlbums(5281959998,'');
This gets the photo albums of the page with ID 5281959998, which is the NY Times.
For now, it doesn't appear possible. Quote from Stream.get:
This method returns an object (in JSON-encoded or XML format) that contains the stream from the perspective of a specific viewer -- currently, a user, and in the near future, a Facebook Page.