Social framework returns "(#803) Cannot query users by their username (username)" when trying to get user feed
Asked Answered
W

1

7

I'm using iOs social framework in order to retrieve facebook feeds from a certain user. For that purpose, after authenticating I'm doing the following:

NSURL *requestURL = [NSURL URLWithString:@"https://graph.facebook.com/username"];
SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET
                                                  URL:requestURL parameters:nil];
request.account = self.facebookAccount;

[request performRequestWithHandler:^(NSData *data, NSHTTPURLResponse *response, NSError *error) { ... }];

The response returns:

error =     {
        code = 803;
        message = "(#803) Cannot query users by their username (username)";
        type = OAuthException;
    };

The same works if I use /me instead of the username, but I want to retrieve someone else public feed.

I also tried using the user's id which also works for my user, but I it doesnt work for other users, the request returns the following:

code = 2500;
        message = "The global ID 100008339709776 is not allowed. Please use the application specific ID instead.";
        type = OAuthException;

I also tried passing the access token as parameter but the behavior is the same.

Any ideas?

Whiles answered 12/5, 2014 at 18:13 Comment(3)
If you created the app after 4/30/2014 you will only be able to get data for users that are using your app.Ignace
hey, thanks @WizKid, where did you get that information?Whiles
Check developers.facebook.com/docs/apps/changelogIgnace
C
6

Already pointed out in the comments, but you are not supposed to use the username anymore and you can´t access data of users who did not authorize your App.

Changelog: https://developers.facebook.com/docs/apps/changelog

(just trying to get the answer rate on SO higher)

Counterstamp answered 10/7, 2015 at 7:35 Comment(2)
I am agree with you but what is this findmyfbid.comUnessential
it´s a platform that most likely scrapes the id from the profile page, which is not allowed.Counterstamp

© 2022 - 2024 — McMap. All rights reserved.