Add the timestamp field to the PAI request

Created on 10 April 2025, 9 days ago

Problem/Motivation

For my project, I need to fetch the media creation date, AKA the 'timestamp' field.

Proposed resolution

This can be done in the getUserMedia() function in src/InstagramBasicDisplayApi.php file as:

$fields = !empty($fields) ? $fields : [
  'id', 'caption', 'media_url', 'media_type', 'thumbnail_url',
  'permalink', 'timestamp',
];

Patch is attached.

For informations, other fields seem to be available from the API (not tested):

  • id
  • ig_id
  • media_product_type
  • media_type
  • media_url
  • thumbnail_url
  • timestamp
  • username
  • like_count
  • comments_count

Remaining tasks

Will try to find time to open a MR

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024