I'm trying to make a call like
$url = 'https://api.instagram.com/v1/tags/'.$tag.'/media/recent?client_id='.$client_id;
but where the $tag
is I want to pass in an emoji in order to get results back for emojis. I've tried .....
$tag = 'U+1F601';
$tag = '\xF0\x9F\x98\x81';
$tag = '\x{1F601}';
Any help would be appreciated
Try a query like
https://api.instagram.com/v1/tags/%D1%88%D0%B0%D0%BC%D0%BF%D1%83%D0%BD%D1%8C/media/recent?client_id=
where %D1%88%D0%B0%D0%BC%D0%BF%D1%83%D0%BD%D1%8C
is an urlencode word (or emoji).
For the example this is an utf-8 encoding word. So you should add
$tag=urlencode($tag);
before query. And $tag
should be in right encoding.