{"id":21700156,"url":"https://github.com/wp-digital/wp-instagram","last_synced_at":"2026-05-07T13:45:06.290Z","repository":{"id":56991755,"uuid":"137879627","full_name":"wp-digital/wp-instagram","owner":"wp-digital","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-11T10:22:56.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T18:59:07.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wp-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-19T11:01:14.000Z","updated_at":"2021-10-11T10:22:21.000Z","dependencies_parsed_at":"2022-08-21T10:10:43.951Z","dependency_job_id":null,"html_url":"https://github.com/wp-digital/wp-instagram","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/wp-digital/wp-instagram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Fwp-instagram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Fwp-instagram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Fwp-instagram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Fwp-instagram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-digital","download_url":"https://codeload.github.com/wp-digital/wp-instagram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-digital%2Fwp-instagram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32740908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T20:13:04.245Z","updated_at":"2026-05-07T13:45:06.273Z","avatar_url":"https://github.com/wp-digital.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Instagram Basic Display integration\n\n### Description\n\nEnables **Instagram Basic Display API** for developers.\n\nThe idea of the plugin is to use [Instagram Basic Display PHP API](https://github.com/espresso-dev/instagram-basic-display-php)\nwith ability to get access token through WordPress admin panel.\n\n### Install\n\n- Preferable way is to use [Composer](https://getcomposer.org/):\n\n    ````\n    composer require innocode-digital/wp-instagram\n    ````\n\n- Alternate way is to clone this repo to `wp-content/plugins/`:\n\n    ````\n    cd wp-content/plugins/\n    git clone git@github.com:innocode-digital/wp-instagram.git\n    cd wp-instagram/\n    composer install\n    ````\n\nActivate **WordPress Instagram Basic Display integration** with [WP-CLI](https://make.wordpress.org/cli/handbook/)\n`wp plugin activate wp-instagram` or from **Plugins** page.\n\n### Usage\n\n1. Check [Facebook Manual](https://developers.facebook.com/docs/instagram-basic-display-api/getting-started) on how to\ncreate an APP.\n\n2. Add required constants (usually to `wp-config.php`):\n\n    ````\n    define( 'INSTAGRAM_CLIENT_ID', '' );\n    define( 'INSTAGRAM_CLIENT_SECRET', '' );\n    ````\n    \n3. Add site auth URL `https://site.com/instagram/auth/` to **Valid OAuth Redirect URIs** in **Basic Display**.\n\n4. Open settings page in WordPress admin panel **Settings** -\u003e **Instagram** \n`/wp-admin/options-general.php?page=innocode-instagram`\n\n5. Click on **Log in** button or **Log in as another user** in case when should change\naccount.\n\n6. Start use [Instagram Basic Display PHP API](https://github.com/espresso-dev/instagram-basic-display-php) through\n`innocode_instagram();` function e.g. `innocode_instagram()-\u003egetUserProfile();`.\n\n7. (optional) Set site deauth REST API endpoint `https://site.com/wp-json/innocode/v1/instagram/deauth` in\n**Deauthorize Callback URL** in **Basic Display**.\n\n### Notes\n\nIf site is a part of [Multisite](https://wordpress.org/support/article/create-a-network/)\nthen main site auth URL should be added in **Valid OAuth Redirect URIs**.\nSo, plugin should be active on all network or at least on the main site additionally.\n\nPlugin adds daily cron job after authorization. So, please be sure cron functionality works.\nThe token tries to update 3 days before the expiration, user profile data updated daily.\n\n### Documentation\n\nBy default, endpoint auth URL is using `instagram` as endpoint, but it's possible to\nchange with constant:\n\n````\ndefine( 'INNOCODE_INSTAGRAM_ENDPOINT', 'insta' );\n````\n\n---\n\n#### App site\n\nIf you want to use one APP for all of your sites where Instagram integration is in use and correctly handle\ndeauthorization process then this plugin could be installed additionally on a site which will store user IDs and URLs of sites\nwhere these IDs are using, e.g. this could be a site of your company. Then it's needed to set one more constant on all\nsites with activated plugin.\n\n````\ndefine( 'INNOCODE_INSTAGRAM_APP_SITE', 'https://app-site.com' );\n````\n\n---\n\nIt's possible to change full auth URL:\n\n````\nadd_filter( 'innocode_instagram_redirect_uri', function ( string $url ) {\n    return $url;\n} );\n````\n\n---\n\nIt's possible to change Instagram permission:\n\n````\nadd_filter( 'innocode_instagram_scope', function ( array $scope ) {\n    return $scope; // Default is array containing 'user_profile' and 'user_media'.\n} );\n````\n\n---\n\nIt's possible to change state parameter which is sending with auth request:\n\n````\nadd_filter( 'innocode_instagram_state', function ( string $state ) {\n    return $scope; // Default is string in format '$blog_id:$nonce'.\n} );\n````\n\n---\n\nIt's possible to change place where endpoint should be added:\n\n````\nadd_filter( 'innocode_instagram_endpoint_mask', function ( $mask, $endpoint ) {\n    return $mask; // Default is EP_ROOT constant.\n}, 10, 2 );\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-digital%2Fwp-instagram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-digital%2Fwp-instagram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-digital%2Fwp-instagram/lists"}