How to get user's location in iOS using google plus sdk? - ios

I am integrating Google Plus login in my app along with Facebook and Twitter login. So, is it possible to get user's location(city) Like Facebook and Twitter? If yes, how?
Any kind of help would be appreciated.

There is a field in the Google+ profile for "places lived" that may contain a location. However, it is not very common for people to share that publicly, so you will likely find only a small proportion of users have it available.
If you want to try, you can retrieve the profile data by following this documentation: https://developers.google.com/+/mobile/ios/people#retrieve_profile_information - this returns GTLPlusPerson for the current user.
From that, look at the placesLived property: https://code.google.com/p/google-api-objectivec-client/source/browse/trunk/Source/Services/Plus/Generated/GTLPlusPerson.h?r=246#128

Related

Get my facebook friends visited places in iOS App

I've implemented login using Facebook account in iOS app developing using Swift. Now want to get list of all places visited by my facebook friends.
Referred this document but could not found search visited places API:
https://developers.facebook.com/docs/places/web/search/
Is it possible?
Appreciate your help and suggestions!
Thanks.
Accessing data of friends (or any user) is not possible, unless they specifically authorized your App with the neccessary permissions.

How can My App Tweet the Contents a User Submits?

Note: I am posting this because I don't even know what to Google search. I know we're all about thorough research before asking these questions. Any help would be appreciated.
Scenario: User writes a text post from my app and when they submit it, the content is added to a Parse.com class (I know how to do this) and simultaneously it is tweeted from a designated twitter account (that does not belong to the user) let's say #MyCoolAppThatTweets.
In other words, I don't want the user via my app to be permanently logged into #MyCoolAppThatTweets twitter account, but have one-time access to send a tweet from it.
Another way to phrase this question would be: How can my app log into a specific twitter account whose credentials I can "bake" into the app without compromising the security of that twitter account.
I am already aware that normally, users of an iOS app wouldn't automatically want their content being tweeted. For the project I'm making, this is not going to be a concern (it's a secret).
If you need more information or if I need to post this elsewhere, please let me know!
From your question I am not sure if you are familiar with "Twitter part" of Parse.com and Twitter REST API. If not please start by reading this https://www.parse.com/docs/ios/guide#users-twitter-users (or take a look on official Twitter way by using their plugin called Fabric: https://dev.twitter.com/)
Since you mentioned PFUser I will describe you how to achieve it by using Parse.com API.
First your user must be logged in to Twitter account.
I suppose that your user is already logged in into your app as a PFUser so best way to log him into some Twitter account is by linking Twitter account with existing PFUser - https://www.parse.com/docs/ios/guide#users-linking.
After that you can post tweets through user's Twitter account (if permission was granted). I recommend doing that using Parse.com Twitter API calls https://www.parse.com/docs/ios/guide#users-login-amp-signup. To create API requests you need official Twitter REST API which can be obtained here https://dev.twitter.com/docs/api.

Retrieve facebook data in backend service

I'm currently working on an app (iOS 6) where the user will be signing in using their facebook account.
In regards to this I have a few questions:
a) Since the app asks the user for permission to access cetain data (like: basic profile info, friend list, access to post to wall etc), I assume that the app based on it's app id will be somehow authenticated to access this information as long as the user doesn't restrict access through their facebook account.
b) will it be possible for example via a service application to authenticate with the same app id as the mobile app, and hence be able to collect data from the facebook users who authenticated with the app?
The purpose of my question is, that I would like do some analysis on the users using the iphone app, but I don't want the app to first download the information from facebook, and then pass it on to my service for analysis.
If the above is possible, could anyone please guide me in the direction of what it is that I need to do? Perhaps links to tutorials that describes this setup, og simply tell me the right facebook terminology that I'm looking for to achive this.
Thanks in advance!
It's a bit late and you may have already picked a service. I have been using Parse.com
(tutorial site). They're very good. They have SDKs and sample code for many platforms a RESTful service for others.
They have recently been acquired by FaceBook, and already have strong links to Facebook's SDK.

Can we add Twitter permissions on demand in an iOS app?

We are making an iOS app that has two points of integration with Twitter:
1. User can use Twitter account to login (or FB account or just email/password)
2. User can share his freshly done work to twitter (just post a tweet)
So for some users we need a read/write access to twitter, but for some only minimal permission for loggin in would be enough and I wouldn't like to scare users away by asking for a write permission on the first login, when they might not even realize the app can share their work to Twitter.
Is it somehow possible to request only login permissions on first start and tweeting permission only on a first Tweeting need?
P.S.
We are not going to use the built-in iOS sharing sheets, because they are good only for sharing to either FB OR Twitter OR elsewhere. We want to offer sharing to Twitter, Facebook, Email and maybe somewhere else simultaneously, in a foursquare app style
I'm not familiar with the recent changes, but I believe that the permission is the one you set in https://dev.twitter.com/apps. So no, you can't do it. I don't think you can do that on facebook as well.
(sidebar: twitter's documentation now is complete mess. I can't find any useful information there)

Get facebook friends that also use spotify

I'm building an iOS app using the Spotify API that requires communication with my Spotify friends. I've come to realize that it's really facebook friends that also use Spotify and that to do that, you need to authenticate with facebook in order to get any sort of info like that. So the next few things I'm trying to figure out, but am getting stuck with are:
With the Spotify SDK, is there a way to tell if it's connected with your facebook account (since it's not required). And if so, do you have to do a separate authentication? I'm guessing yes.
With the facebook open graph api, is there a way to get a list of your friends that also use Spotify. I know that you can get friends using that have authenticated your app, but haven't found a way to find out about others. Not sure if it's possible.
Based on what I've read here that what I'm trying to do isn't going to be possible. Or if it is a huge pain. Anyone have any thoughts?
Nope. However, with CocoaLibSpotify, if the user logs in with an email address you can be sure it's a Facebook account since vanilla Spotify usernames aren't email addresses.
Nope. You could look at each friend's public listens using the Facebook API, though, but that isn't ideal.

Resources