Can I show user data to other users in Stormpath? - swift

I'm trying to integrate Stormpath to an iOS app (Swift), and would like to be able to show one user's data to another user.
In other words, can I show 1 user another user's information by searching my userlist for certain factors (such as age or geographic location) like I would be able to with mySQL?
Is this possible? I haven't been able to find documentation for this.

To do this, you would implement an API endpoint in your backend application that exposes whatever information you need (for example, another user's data), and then have your iOS app make a request to your API to retrieve that information and display it on the device.
Stormpath is really flexible and will allow you to do pretty much whatever you want with your user data, so as long as you can write an API call on your backend to retrieve the data, your iOS app can show whatever you want =)
SOURCE: I work # Stormpath.

Related

Accessing User 'Most Listened To' using Spotify / Echo Nest / Facebook API

I want to know if I can access a user's play history (more specifically what songs they listen to the most) for an app. The app I am building can perform the same goal with iTunes using their built-in play counter. I know Spotify uses a similar counter, but I assume for privacy concerns they don't want to deal with privacy concerns from concerned users. However, I saw a few instances where it was suggested that this task could be accomplished using Facebook's API, or Echo Nest's API. Please let me know if anyone has some constructive suggestions toward finding a way to legally obtain a particular users 'most listened to songs', or something to that effect.
SB
There's some documentation about Open Graph Music on the Facebook Developer homepage:
https://developers.facebook.com/docs/opengraph/music/
Baseline is that you only can request a User's play history if he gave you app the explicit right to read his data.
The relevant permissions would be
user_actions.music https://developers.facebook.com/docs/facebook-login/permissions/v2.1#reference-user_actions_music
user_actions:{app_namespace} https://developers.facebook.com/docs/facebook-login/permissions/v2.1#reference-user_actions__app_namespace_
Then, you should be able to request
GET /me/music.listens
according to https://developers.facebook.com/docs/reference/opengraph/action-type/music.listens/ You'll need to perform the aggregation of the most played songs/artists yourself, because there's no endpoint for that.

iphone post to google fusion table without login

I need my iphone app to allow users to post to a google fusion table without entering a username and password. currently I use google client login with the password hard coded into the app. Obviously this is a poor solution, but I cannot find how to do this with oauth?
Do you want the user to be submitting data to their own individual fusion tables, or all users to be modifying a single table that you own?
For the first case, you'll want the user to authorize (via oauth) access to their account (there's no iOS specific client library from Google, but there are a number of answers here in SO about how to do this)
If you want everyone to be entering data into the same table, the best practice is probably not to hardcode the password and/or tokens into your app, but rather to use a proxy (for example via a service account running on AppEngine). Note that this proxy should still do some kind of authentication with your iphone users so random folks can't just easily post whatever they want to it w/o running your app.

How do I store a user data for a FB application?

Say, I wrote a flash game for the Facebook and I want the user to be able to view his playing history (dates, points, highscores...). Do I necessarily have to build my own database for that? Are there any other options? I mean, ANY?
Facebook will provide some general statistics about your app (like the number of views), but if you want something as specific as points and high-score statistics, you will have to use your own database.
You could have your app publishing scores to Facebook, and also read them back from the API: https://developers.facebook.com/docs/scores/

Facebook: detecting user apps

Hello I've read the docs and am having trouble getting a definitive answer for the following questions:
Can our app detect if another app is used by a given user. What about if we are admin of, or have the id of both apps.
If one of the apps is removed from FB is there a way to tell if a user had it installed before it was removed? A sort of history of past apps, I guess.
Here:
FB Connect: is there a way to see the logged in user's facebook apps?
Best answer is "I think the most you can do..." but I'd like to know for sure.
Thanks for any help.
If you request the permission user_actions:APP_NAMESPACE you can see the open graph actions that the user has performed in that app.
http://developers.facebook.com/docs/authentication/permissions/#open_graph_perms
In my apps I generally store the user ID of all authorized users in a database, and when I get a call via the "Deauthorize Callback URL" I don't delete the user from the database, but instead only flag the user as deauthorized.
This way I can easily get an overview of users that are using (or have used) any of my apps. This allows me to present special features for users who are using several of my apps.
For example, let's say I made a photo app (like Instagram) and a GPS running app (like Endomondo). If the user takes a photo with Instagram while running with Endomondo, I could present the option to GPS-tag the photo, or add the photo to Endomondo.
This is something that I think we developers should use more. Perhaps present an open API to other apps, to let the apps work together.

Twitter Search alerts for iPhone

I'd like to use Urban Airship to send push notifications to a user's iPhone when a new Twitter Search result is found.
I'm pretty positive I'd need a web app built to accomplish this - to register the user's iPhone, save their search terms and poll Twitter Search. How could I go about building this app (in terms of which language to use, etc.)?
Thanks so much.
You are right, you need to build a web app which automatically searches Twitter and then creates a push notification payload to deliver to your users. In addition, you may want your app to also accept requests from users to retrieve the actual tweets. This is because you can't just load up the tweet content into a notification payload, as their is a rather small size limit.
Since Urban Airship works via HTTP, you can use whatever the heck language you want. Just go with what you know, there is no preferred way to do it.
I will say this though - there are lots and lots of tweets added every second. Scalability is probably going to play a pretty big factor in whatever you are trying to do. Which is probably why a year later there aren't very many Twitter apps that support Push.
Everything said previously is correct, I just wanted to add one thing:
I strongly recommend looking into http://superfeedr.com to handle getting te data.
With Superfeedr, you can take advantage of their PubSubHubbub API and not have to do any of the RSS parsing yourself.
Here's how the flow would work:
User subscribes to a Twitter user/search on the phone.
Phone tells your service that User X has subscribed.
Your web app registers with superfeedr to watch that RSS feed (and you keep track of this relationship)
When a new item appears, Superfeedr POSTs to your web app with the latest items.
You look up the relationship between user and feed and tell Urban Airship to send an alert to that user.
This way, all your webapp has to do is intelligently keep track of relationships.
#bpapa is right and you should use the language you know best. Also, I would recommend looking into Twitter Streaming API, it will help you make your application actually realtime.