Can the opensocial API remotely search for users in orkut etc.? - ruby

Does anyone know if (and how) I can build an application (Java/Ruby/whatever) doing REST or RPC calls to a social network like Orkut (using opensocial) to search for a user by name or email address? So far I know that I can list all friends for a particular user ID, but I want to search among all users. Would I need to code it as an app/gadget running inside the google sandbox or is there a way to get a list of matching user ID via REST?
So far I got this one to work: http://code.google.com/p/opensocial-ruby-client/wiki/GettingStarted. But with this API and the gadget linked there I only get people that are already linked to me...
Thanks for answers,
Martin

No, you can't do that. At least, OpenSocial doesn't have spec like that.
In addition, SNS normally have privacy policy which disables developers to poke around users who hasn't installed your app.
Think OpenSocial API access to private information is quite limited.

Related

How to bulk update "Authorized JavaScript Origins" in Google API Console?

Currently, I have been tasked to utilize the Google People API to ask for a user's basic Google information along with their public phone numbers. So far the results have been positive.
The solution my team and I have incorporated the Google People API integration in has the capacity to be utilized across thousands of domains. As a result, my question is simply, How can my team members and I ensure that any our clients that utilize our solution with their own particular domain get our new functionality built with the Google People API?
Keep in mind, our clients have the flexibility to have http/https and any subdomain on their site. Entering each domain possibility for our client base one by one would not be an easy task. I'm seriously hoping there is a solution around the single, explicit origin entries.
Thank you for your time and help.
Warning:
You must remember that if this is source code you are giving your clients that you are not allowed to release your client id and client secret. This includes plugins and scripts.
On November 5th 2014 Google made some changes to the APIs terms of Service.
Asking developers to make reasonable efforts to keep their private
keys private and not embed them in open source projects.
So if your clients could view the code of your application and see your client id and secret you should not be giving it to them.
Read more about this issue Can I really not ship open source with Client ID?
Recommendation:
The best solution for you will be to instruct your users now to create there own project on Google Developer Console and create their own JS origins.
You may just have to provide your own wrapper around the target API where you authorize the client request yourself and then do the request from Google using your own credentials.

Get all apps a user has from Google API

I'm looking for a way to get a list of all the users apps (that is apps published by the user NOT apps downloaded by the user).
Which API should I be looking at? I'm also interested in getting data about the apps uploaded.
Something like this:
https://play.google.com/store/apps/developer?id=Goodgame+Studios
But as a api call.
As far as I know there is no official API to do that.
You may look for some third-party APIs like http://www.playstoreapi.com but I don't know if it is enough for you.

How can i get list of domain users from Google Apps account without administrative access?

This is a similar question to How can i get list of Domain user's from Google Apps account?
However, I'd like to use a normal account (not an administrative account) to retrieve the user list. It seems like this should be possible as the gmail autocomplete returns domain contacts not listed in the user's contact store. I've looked at the autocomplete Ajax call, but it requires something in the beginning of the string (and no, I don't really want to loop through a-z one by one - that is just way to hacky). For example:
https://mail.google.com/mail/c/u/0/data/contactstore?ac=true&ct=true&gp=true&hl=en&id=domain&max=15&out=js&tok=beginningOfUsersName&type=4
Both versions of the Google contacts API seem to omit domain users unless you have them imported into your own contacts list. I've also looked at querying users in the "Coworkers" system group, all to no avail. I also find it interesting that "add a coworker's calendar" on Google calendar does not provide autocomplete - they use a popup instead.
I'm working on a C# project, but this is a general Google API question, so any pointers in any language would help.
Update
It looks like this is feasible now with admin/directory google api endpoints
see: https://developers.google.com/admin-sdk/directory/v1/guides/manage-users?authuser=0#retrieve_users_non_admin
Original answer
I was able to work around this issue, so I'll document the workaround, even if it doesn't involve Google. I wrote a program (in C#) to query the internal Active Directory (LDAP) store and pick up all the users from there instead. At that point I could get their email addresses and query Google with it. Not the best method, but it worked for my needs.
The C# was roughly patterned from this powershell script, although I pulled out the computers query and added in the capture of the user's email address: http://www.visualbasicscript.com/List-all-users-or-computers-in-the-default-domain-m35650.aspx
The LDAP property I included to get the proper email address for Google was 'proxyAddresses', although this will not be correct for all environments.

Google OpenID-OAuth hybrid implementation on Heroku

I am looking for a step by step guide to implement Google OpenID+OAuth in our Webapplication running on Heroku for getting calendar/contacts data. I have looked at many documents and Q&A about this but still can't make things work and was wondering if anyone here knew of a place which describes the plugins, gems needed and a step by step guide. The reason for using the hybrid is that we need a permanent token from Google that we can track for users across multiple sessions.
Truly appreciate any help.
Best,
_KK
You cannot use Google's OpenID to access other service. So you will need to ask user to provide username/password when you want to access calendar (make sure it's SSL-ed!).
So for calendar you can use: GCal4Ruby.
But in general you can access user data using official Google GData gem.

can Yahoo and Hotmail contacts api be used without leaving the site?

I might be missing something but I'm trying to implement a contacts retrieval mechanism akin to the one that is offered by Google for Yahoo and Hotmail. Both APIs seem to require the user to actually go to their sites to log in. The documentation is really convoluted for both. I was hoping someone has done this and can point me to a simple way (if there is one) to allow the user to log in directly in my app and then for me to go and fetch their contacts for them (preferably in XML, but JSON would also do nicely).
I currently have a Perl script that goes and gets the gmail stuff and works very nicely. I was (maybe wildly optimistically) hoping that Yahoo and Microsoft would have similarly useful mechanisms.
Check out Open Inviter: http://openinviter.com. It has Yahoo, Hotmail, and many more :)
Seems http://openinviter.com domain is no more. There are few other providers available in market out of which I liked https://socialinviter.com, give it a try.

Resources