1

I'm trying to delete a user's facebook game achievement, for testing purposes.

I'm doing it in an iOS app, but I suspect the problem is independent of the iOS side of things.

I have created, and awarded the achievement, and it all seemed to work. I used:

 NSDictionary *params = @{@"achievement": @"(the achievement number)"};

 FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                                      initWithGraphPath:@"/me/achievements"
                                      parameters:params
                                      HTTPMethod:@"POST"];
 [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                              id result,
                                              NSError *error) {
            NSLog(@"result: %@", result);
            NSLog(@"error: %@", error);
        }];

But then when I try to delete the same achievement, using:

 NSDictionary *params = @{@"achievement": @"(the achievement number)"};
 FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                                      initWithGraphPath:@"/me/achievements"
                                      parameters:params
                                      HTTPMethod:@"DELETE"];
 [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                              id result,
                                              NSError *error) {
            NSLog(@"delete result: %@", result);
            NSLog(@"delete error: %@", error);
        }];

I get in the result:

body =     {
     error =         {
     code = 100;
     "fbtrace_id" = (the trace id);
     message = "(#100) achievement should represent a valid URL";
     type = OAuthException;
     };
};
code = 400;

Now, I would have thought the url is correct, as I can create and award the achievement correctly (as is shown when I get a users achievements)

One thing I noticed, is that in facebook's Object Browser tool, there is nothing in the "og:url" column for this achievement, nor a couple of other columns that should have things in them. However, when I use facebook's Sharing Debugger tool, it reports that the "og:url" field (and others) is properly populated, with a url, e.g.:

http://www.example.com/achievements/correct.html

Any thoughts? thanks.

narco
  • 830
  • 8
  • 21

0 Answers0