According to Facebook Graph API, I need the postId or the objectId to fetch the comments on the specific post, but upon visiting the post, the url gives a hashed parameters so I am unable to get the postId.

BUT if the post contains a photo, I can click on that photo and get its Id, then I can get the comment but for that photo only not on the post itself.

So how can I get the postId when Facebook only gives a hashed value when vieweing the post?

I was sent many msg by whatsapp API sent successfully and suddenly got an error message
(#135000) Generic user error
Phone Number: +966 50 612 6276 Email Address FB: [...] APP ID: 804460901614985 WhatsApp Business Account ID: 316522031545271 Phone number ID: 289654480905686
App ID: 418035371023763
Response Error: 400 bad Request { "error": { "message": "(#135000) Generic user error", "type": "OAuthException", "code": 135000, "error_data": { "messaging_product": "whatsapp", "details": "Generic user error" }, "fbtrace_id": "AUC_GOOkiSJb3f-aL1iyd9m" } }

I'm developing SDK for Facebook(meta) and use FBSDKGraphRequest to get some data. As the demand of access-token, I want to test the case that access-token has been invalid(mostly out of time), so I generate a short term token from fb's graph developer and wait for 2 hours until it invalid. Then I build an out-of-date token and FBSDKGraphRequest. Use FBSDKGraphRequest but nothing back(no result, no error).

I generate a short term token from fb's graph developer and wait for 2 hours until it invalid.

Use these code :

FBSDKAccessToken *access_token = [[FBSDKAccessToken alloc] initWithTokenString: @"xxxxxx"(tokenString from graph developer)                                                                        permissions:@[@"public_profile",@"email", @"user_friends"]                                                                declinedPermissions:nil                                                                 expiredPermissions:nil                                                                              appID:@"xxxxxx" (my appid)                                                                             userID:@"xxxxxx"(myuserid)                                                                     expirationDate:[NSDate dateWithTimeIntervalSince1970:1717041600]                                                                        refreshDate:[NSDate dateWithTimeIntervalSince1970:1717041500]                                                           dataAccessExpirationDate:nil];     [FBSDKAccessToken setCurrentAccessToken:access_token]; 

I generate a FBSDKAccessToken which generated by out-date tokenString and test in these code :

            FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]                                           initWithGraphPath:@"/me"                                           parameters:@{ @"fields": @"picture",}                                           HTTPMethod:@"GET"];             [request startWithCompletion:^(id<FBSDKGraphRequestConnecting>  _Nullable connection, id  _Nullable result, NSError * _Nullable error) {                 NSLog(@"request back!");                 NSLog(@"fb has error:%@", error.description);                 //get picture url             }]; 

When the token is valid(not out of date), it works and has log. But when it is invalid(out of date) , there is no log(no result no error, even no "request back!".

After long time debug and searching answer on Google, I don't find similar reason. But I find FBSDKAccessToken have a func "refreshCurrentAccessTokenWithCompletion" can also get the status of the token. So I used this to judge the token's status before FBSDKGraphRequest. But something magical happened. After I add refreshCurrentAccessTokenWithCompletion, FBSDKGraphRequest works too. It shows log "request back!".

This might be a way to solve this problem. But I think there must be a method to solve this better and some root cause.