Is it possible to search twitter users by url? - api

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.

Related

How to get such header title and search input in Google search for website

How to get such header title and search input in Google search for website like below:
I am doing my website with core PHP (not any CMS like WordPress, Drupal etc.). So please help me to get such a result in Google.
This is called Sitelinks.
Check it out here: https://support.google.com/webmasters/answer/47334?hl=en
It's an Google automated process and you can't do much to control it. Although a google search on "how to get sitelinks" gives you plenty of results on how to get them, for example, here, or here.
Or perhaps you can purchase them under your AdWords advertisement.
As far as I know, it is much related to PHP. It's more on Search Engine Optimization (SEO).

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.

Google+ Company pages

I am trying to access my company pages in Google+ via its API. However, I can find an endpoint that would return my company page?
I've looked at this endpoint, but I don't see a way of listing all of my companies.
https://www.googleapis.com/plus/v1/people/me
Any ideas?
Instead of the "me", you should be able to use the 21 digit code you'll find in the URL if you look at a page's profile.
You cannot currently determine what pages are owned or managed by a user. You may wish to star this bug to indicate your interest in having this implemented.

Facebook graph API not returning all mentions

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

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.