I am attempting to determine who among my facebook friends are currently using my app. The general wisdom, as far as I can tell, is to use the graph api, and send the 'installed' parameter when getting your friends list. This does not seem to be working for me, and I am wondering where I am going wrong. This is my code:
First, the permissions in effect:
_facebookPermissions = @[@"publish_stream", @"read_stream", @"friends_photos", @"user_photos"];
Now the SLRequest and it's setup:
NSString *username = [[NSUserDefaults standardUserDefaults] objectForKey:@"fbUserID"];
NSString *urlString = [NSString stringWithFormat:@"https://graph.facebook.com/%@/friends", username];
NSURL *friendsList = [NSURL URLWithString:urlString];
NSDictionary *friendsListParameters = @{@"fields": @"id,name,picture,installed"};
SLRequest *getFriends = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:friendsList parameters:friendsListParameters];
Now a sample result:
{
id = 10000123456911;
name = "Don Dobrian";
picture = {
data = {
"is_silhouette" = 0;
url = "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash3/41664_100001237218111_2269_q.jpg";
};
};
},
As you can see, the permissions will get me almost everything. But there is no indication at all that the 'installed' parameter was even noticed. So here are my questions, the answer to any one of which would solve my problem:
- Is this how you do it? What permissions are you using to get the 'installed' status?
- Is there a better way to get this information using the iOS Social Framework?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…