Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Find My Friends
var options, req, request;
request = require('request');
options = {
uri: '{account_id}/{unique_device_id}/minCallback/selFriend/refreshClient',
method: 'POST',
headers: {
'X-Apple-AuthScheme': 'Forever',
'Content-type': 'application/json'
auth: '{account_id}:{token}',
body: JSON.stringify({"clientContext":{"appName":"FindMyFriends","appPushModeAllowed":true,"appVersion":"1.0","apsToken":"{token}","currentTime":1329270015284,"deviceClass":"iPhone","deviceHasPasscode":true,"deviceUDID":"{unique_device_id}","isAppRestricted":false,"lastLoggedInPrsId":"{account_id}","osVersion":"5.0.1","productType":"iPhone4,1","pushMode":true,"selectedFriend":"{friend_id}","userInactivityTimeInMS":30910},"dataContext":{"0":1328314711351,"1":1328314723801,"10":1328937737002,"11":0,"12":0,"13":0,"2":1328314723801,"3":1329270006376,"4":0,"5":1328901258718,"6":4,"8":19,"9":"9C5D4229E6387FD279C9EA7F3B7DD9D5","followingFenceVersion":0},"serverContext":{"authToken":"{based_64_encoded_token}","callbackTimeoutIntervalInMS":0,"clientId":"{client_id}","maxCallbackIntervalInMS":60000,"minCallbackIntervalInMS":5000,"prsId":{account_id}}})
req = request(options, function(error, response, body) {
var data = JSON.parse(body);
var following = [];
var locations = [];
for (var i = 0; i < data.following.length; i++) {
following[data.following[i].id] = data.following[i].invitationAcceptedByEmail;
for (var i = 0; i < data.locations.length; i++) {
location = data.locations[i];
if (following[]) {
if (location.location != null)
locations[following[]] = location.location.address.formattedAddressLines.join(', ');
for (var k in locations) {
console.log(k + ' :: ' + locations[k]);

This comment has been minimized.

Copy link
Owner Author

barkerja commented Apr 16, 2012

The accound_id and unique_device_id properties need to be captured using a proxy.


This comment has been minimized.

Copy link

batteryshark commented Oct 7, 2015

but where does the token come from? The normal mmetokens don't seem to work...


This comment has been minimized.

Copy link

ndattani commented Nov 18, 2018

This doesn't find the GitHub profiles of all my Facebook friends?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.