Closed juuga closed 9 years ago
I believe the tag should be escaped with curl_escape
for it to correctly become MyT%C3%A4g instead of MyT\xC3\xA4g
I figured it out. The tag should be passed to urlencode()
. The problem is that $instagram->getTag()
return the tag once again without the encoding. Here is a work around:
$tag = $instagram->getTag( urlencode('MyTäg') );
// reset tag to escaped version
$tagData = $tag->getData();
$tagData->name = urlencode($tagData->name);
$tag->setData($tagData);
$media = $tag->getMedia();
Hope this helps someone. I will see if I have time to make a pull request at some point...
When I call
an
Instagram\Core\ApiException
is thrown with message 'Unknown Error'. When I remove the 'ä', it works fine. I have triedutf8_decode
andiconv
, but they have not helped.The special characters get converted to something like MyT\xC3\xA4g which, of course, does not work in the URL
https://api.instagram.com/v1/tags/<TAG>/media/recent