Skip to content

Commit

Permalink
feat(social-source): added a disconnect notification to instagram
Browse files Browse the repository at this point in the history
  • Loading branch information
egordidenko committed Dec 23, 2024
1 parent 5dbc029 commit 20081f6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions blocks/SourceList/SourceList.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { Block } from '../../abstract/Block.js';
import { stringToArray } from '../../utils/stringToArray.js';
import { UploadSource } from '../utils/UploadSource.js';

export class SourceList extends Block {
initCallback() {
super.initCallback();
this.subConfigValue('sourceList', (/** @type {String} */ val) => {
let list = stringToArray(val);
let html = '';

list.forEach((srcName) => {
if (!Object.values(UploadSource).includes(srcName)) {
console.error(`Source "${srcName}" not found in UploadSource`);
if (srcName === 'instagram') {
console.error(
"Instagram source was removed because the Instagram Basic Display API hasn't been available since December 4, 2024. " +
'Official statement, see here:' +
'https://developers.facebook.com/blog/post/2024/09/04/update-on-instagram-basic-display-api/?locale=en_US',
);
return;
}

Expand Down

0 comments on commit 20081f6

Please sign in to comment.