Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgUserProfile translation issue for name="error" #1169

Closed
Moon-sparkcentral opened this issue Sep 20, 2021 · 8 comments
Closed

IgUserProfile translation issue for name="error" #1169

Moon-sparkcentral opened this issue Sep 20, 2021 · 8 comments
Assignees
Milestone

Comments

@Moon-sparkcentral
Copy link

Moon-sparkcentral commented Sep 20, 2021

Hi
We make a call for user profile with a sender id and we ask for name and profile_pic, the caller takes from GraphAPI gets this result :
{
"name": "error",
"profile_pic": "https://scontent-bru2-1.cdninstagram.com/v/t51.2885-15/s200x200/94007776_534488077252009_251463647916720128_n.jpg?_nc_cat=103&ccb=1-5&_nc_sid=8ae9d6&_nc_ohc=0SmYjQva3p8AX8Bt5IK&_nc_ht=scontent-bru2-1.cdninstagram.com&reslog=d&edm=ALmAK4EGAAAA&oh=870a850d69bbc1efe3b351016403d3df&oe=614D81A3",
"id": "6119198718152259"
}
but the result that we take is not that user profile, we get an exception with this message for it:

com.restfb.exception.FacebookGraphException: Received Facebook error response of type null: null (code 0, subcode null) 'null - null'

So you translate this profile wrong. Could you please look for it.

Regards
Moon

@nbartels
Copy link
Contributor

Can you please show the restfb calls you make to fetch the information and what mapping object you are using?

@nbartels nbartels self-assigned this Sep 20, 2021
@Moon-sparkcentral
Copy link
Author

Moon-sparkcentral commented Sep 20, 2021

this is our call
.fetchObject(senderId, UserProfile.class, with("fields", "name,profile_pic")));

@nbartels
Copy link
Contributor

The FacebookGraphException is something we receive from Facebook itself, so I suggest you enable logging on debug and check the generated URL. Maybe you can use curl or insomina (or something else) to check the validity.

Additionally, you can check the preconditions here: https://developers.facebook.com/docs/messenger-platform/identity/user-profile/

Do you meet them all before sending the request to FB?

@Moon-sparkcentral Moon-sparkcentral changed the title User Profile Translation issue for name="error" IgUserProfile translation issue for name="error" Sep 20, 2021
@Moon-sparkcentral
Copy link
Author

I tried again with Curl and also on Facebook Graph Api UI and see the right data comes from FB GraphApi as I have mentioned in my first message. I have debugged it. So after the fetchObject() call , we get the exception.

@nbartels
Copy link
Contributor

okay, so I have to build up a test environment for this.

Maybe you can check the general stuff in the meantime, user id correct, page access token used, network connection to Facebook okay...

@Moon-sparkcentral
Copy link
Author

Yes I have checked all those stuffs, everything is ok.

@nbartels
Copy link
Contributor

To get this solved soon, I suggest you get in touch with us via email: team@restfb.com
So we can exchange sensitive data.

@nbartels
Copy link
Contributor

Okay, so we have analysed everything, and it is the username that runs in the program flow into the exception generator because it is "error". We have a short circuit that contains a string comparison and this is with this username very bad.

After understanding the problem, we will fix this with the next version.

@nbartels nbartels added this to the 3.22.0 milestone Sep 24, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants