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

Recommendations do not work for Instagram profiles #19759

Open
1 task done
cathysarisky opened this issue Feb 27, 2024 · 1 comment
Open
1 task done

Recommendations do not work for Instagram profiles #19759

cathysarisky opened this issue Feb 27, 2024 · 1 comment
Labels

Comments

@cathysarisky
Copy link
Contributor

Issue Summary

The recommendations-related /check endpoint does not correctly parse the response from Instagram:

  1. Prepopulated fields are generic, not from the profile
  2. The recommendation feature_image is base64 encoded and causes the recommendation to be rejected upon attempting to save.

Steps to Reproduce

Add a recommendation to an Instagram Profile.
Observe prepopulated fields.
Attempt to save it.

Details (from this forum post: https://forum.ghost.org/t/valid-url-issue-with-recommendations/45281/8 )

Prior to saving, what's populating the preview looks like a login page, not the profile page entered, although the URL is the profile page. And the image URL is actually base64-encoded, which is probably what's breaking things on attempting to save.

Ghost Version

Ghost Pro

Node.js Version

Ghost Pro

How did you install Ghost?

Ghost Pro

Database type

MySQL 8

Browser & OS version

Chrome, Windows 10, freshly updated

Relevant log / error output

Here's what the /check endpoint returns:

{
    "recommendations": [
        {
            "id": null,
            "title": "Login • Instagram",
            "description": null,
            "excerpt": "Welcome back to Instagram. Sign in to check out what your friends, family & interests have been capturing & sharing around the world.",
            "featured_image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAADTbI/v/KBhsCbrDBhoAbbAi4wQYbAm6wIeAGG2wIuMGGgBtssCHgBhsCbrDB/wlKajuIhIz6AQAAAABJRU5ErkJggg==",  (Truncated before posting issue)
            "favicon": "https://static.cdninstagram.com/rsrc.php/v3/yG/r/De-Dwpd5CHc.png",
            "url": "https://www.instagram.com/yomikestevens/", 
            "one_click_subscribe": false,
            "created_at": null,
            "updated_at": null
        }
    ]
}
===================================

And here's the 422 response on trying to save the recommendation with the (incorrect) check response above.  

{
    "errors": [
        {
            "message": "Validation error, cannot save recommendation.",
            "context": "recommendations.0.featured_image must be a valid URL",
            "type": "ValidationError",
            "details": null,
            "property": null,
            "help": null,
            "code": null,
            "id": "f6d58dd1-d573-11ee-9d12-7d870f824854",
            "ghostErrorCode": null
        }
    ]
}

Code of Conduct

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Feb 27, 2024
@dipaksinha1
Copy link

Hi @cathysarisky , Can you assign me this task?

@daniellockyer daniellockyer added the P3 label Feb 28, 2024 — with Linear
@daniellockyer daniellockyer removed the needs:triage [triage] this needs to be triaged by the Ghost team label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants