Skip to content

Instantly share code, notes, and snippets.

View swappyp20's full-sized avatar
🎯
Focusing

Swapnil Pawar swappyp20

🎯
Focusing
View GitHub Profile
@swappyp20
swappyp20 / AddMoreRemoveForm.php
Created January 9, 2018 07:02 — forked from patilvishalvs/AddMoreRemoveForm.php
Add remove form elements with tabledrag and ajax drupal 8.x
<?php
namespace Drupal\experiments\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Component\Utility\SortArray;
/**
* Class AddMoreForm.
<?php
//Get data from instagram api
$hashtag = 'max';
//Query need client_id or access_token
$query = array(
'client_id' => '',
'count' => 3
);
$url = 'https://api.instagram.com/v1/tags/'.$hashtag.'/media/recent?'.http_build_query($query);