Add video and carousel support + Upgrades for social network use cases.

Created on 6 November 2022, about 2 years ago
Updated 12 June 2024, 5 months ago

Problem/Motivation

I'm building a niche community website. My vision was to find a module that would allow my users to import their content with a simple form. This module was the closest I could find and I should say that I'm extremely grateful for it.

It wasn't quite there though. These were the things that made it unusable for my use case.

  • No video support.
  • No carousel support.
  • No way to control the fields that users see ie API details and content mapping.
  • No way to set site defaults for where the posts will be stored ie media bundles, content types...
  • When imported media was stored, the tokenised directory paths were ignored. Media was just saved in public://
  • Permissions were there but some had no effect. As far as I could tell, in order for users to edit their accounts required giving access to edit all accounts. Equally with delete and lists.
  • When a user removes access on Instagram, it doesn't update the website. This is required for the application approval process.
  • The creation date used for Instagram content was the Imported date, not the date originally posted on Instagram. This is a problem to my use case. If someone joins who has a 1000 posts or more, they'll take up the top of all lists. Drowning out everyone else's content.
  • The module only imports the last 25 posts. I want all of them.
  • Add support for OCR Image → module. This module can extract text from images and save it, as per that modules configuration. (alt, title and optional text field)

Proposed resolution / Completed

  • Create pages for end users, outside of /admin/ to manage their Instagram accounts. These would require the "...own..." permissions. Whilst also verifying that they do own the account. Otherwise throw a Access Denied page. /instagram-accounts/[instagram_id]/edit & /instagram-accounts/[instagram_id]/delete.

    I was unable to do the same for adding a new one. Upon returning from Instagram authorisation, the fields wouldn't get populated. I left my progress in my update in case anyone one knows how to resolve it. The form can be found at /instagram-accounts/add
  • Add a default view for listing own Instagram accounts.
  • Add settings to create a node to display posts. This will make it possible to support carousels.
  • Add settings for video media support.
  • Add permissions for the fields on the Instagram account form. In order to hide fields from end users
  • Add settings for global defaults for the website. Ie image bundle, video bundle...
  • Add support for tokenised directories, set in the media field settings.
  • Update dependency for Media entity Instagram 2.0, to Media entity Instagram 3.0. I've fully tested 3.0 and no problems. 2.0 won't work anymore according to the projects page. So I didn't even try 2.0.
  • End points for Instagram to update the website; Data deletion and Deauthorize. It's important to know that when a user deauthorises your app via Instagram, all content (nodes, media and files) owned by that specific account will get queued for deletion. This queue is processed on cron runs. This is a Instagram requirement, not my choice. The module adds a new basefield to nodes and media entities for storing the owners Instagram ID. It is this ID that is used for the deletion process.
  • Deletion status page. /instagram-accounts/[instagram_id]/delete-status. This is a Instagram requirement on the deletion callback and passed on to the user by them.
  • For the first import, fetch all IG posts for the account.
  • Optionally use OCR Image module → .
  • Short video tutorial to walk through the set up. Also add README file with written instructions. Took me a while to figure it out. https://youtu.be/r-qiG-U2y1E
✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom gMaximus

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024