Can the Facebook API give location of user on mobile device? - facebook

I've found that it's easy to obtain 'current location' of Facebook users based on what they manually enter in on their profile. However, I'm curious if a Facebook user logs into my app with their FB log-in, can I get their location data as they go from one place to the next? For example, my app recommends the user go to a certain location. I want to know if that user actually goes to that location. I don't need to know their location down to the minute, just periodically where they end up, maybe every half hour or hour.

No, this is not possible via the Graph API or SDK. You could track the GPS location via the device's sensor data if you're creating an own app for iOS or Android for example.

Related

Cross device user tracking

Let's say I have a facebook campaign displayed on mobile device, which leads to conversion (android application installed, it's deeplinked). Now the same user opens my webpage (with facebook pixel) on his desktop computer and buys some stuff there.
I would like to track that conversion was initiated by that campaign - with some external tool (mixpanel, exponea...). Is this possible? Is facebook pixel the right way to achieve this?
The user is not logged in, just on facebook on his device and his desktop.
You can use mixpanel library to track the user events in different platform. The distinct id in mixpanel maintain the cross device user tracking whenever you login with same user.

iPhone location service - how to get data?

Is it possible to get location of iPhone that has location services on, when I don't know user login data without installing anything on device?
No and Yes, You can use HTLM 5 location API in a website. But you will not be able to request iPhones location like with find your friend app.
Since you need to have your own backend to store to locations you will need have an app which will track the location and passes it to the backend.

"Find my friends" style GPS (remotely ping for location)

In the "find my friends" ios app, a friend can ask for another person's location. Find my friends grabs the location in the background and the location services arrow appears momentarily. I am mainly concerned with the fact that the GPS arrow indicator is only shown when the user is pinged by a friend (does not remain on).
My intended scenario: Bob opens the app and pings his friend John for John's location. John's phone momentarily shows the GPS arrow and in the background, sends back his location to the server where we can send info back to Bob.
What is the basic strategy for accomplishing this? Is there some way to wake the app in the background to grab location?
I don't want to use something like significant location changes as I only want to grab user location when a specific action happens (a friend pings them).
Thanks so much!!
Even I am trying for the same solution but after loads of R&D I found that there is no way you can request a device to open up the app and send the location... apple used their own api to get the location of friend when request arrives.
You need to have a service running on the phone that can handle a request to get user location ans send it back.

iphone friends location app

What kind of api does SDK provide if we are to develop an app which keeps tracks of friends location?
Update:
CoreLocation gets the device location with the app running. But how to get the friends location data if you have their phone number.
Does anyone have idea to get the location data of friends using iphone sdk
I'm guessing you mean something like Core Location framework? This still would only be able to track the device location with the app running. You would have to pass your friends location data to a server and fetch it from there to be able to track them on any device.
http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CoreLocation_Framework/index.html
I would be surprised if Apple let any old app communicate with another iPhone to determine that iPhone's location. You'll probably have to maintain a database of locations that syncs with your app from time to time. Anyone using that app will then be able to access their friends' locations.

iPhone: Core Location to keep asking for user permission

I have an app that ask for user's Location. Then user's location will be send to a server. Since the app that was run on first time on a iPhone will ask for permission, if a user rejects it, the app will keep on asking it on next time until it was allowed (AFAIK); but if the user allows the app to use the location twice, the app will not ask anymore for the user's location at the third time. Seems like it has been stored on preference.
My question was how I can keep my application to ask to permission for their Location every time they run my app.
Thanks.
There's no way to do this with the built-in API. You'll have to put up your own dialog and confirm it.