What I'm trying to do is retrieving profile photos from a user and sned them for another, all by PHP.
The problem is when I send photos using file_id
string, all of the photos sent to user are the same single picture!
I've not really run that but I'm sending my own photos to myself for testing the functionality and the result is my current telegram profile picture, every time.
My code:
<?php
define('my_id', '12345678');
$userPhotos = apiRequestJson("getUserProfilePhotos", array('user_id' => my_id, 'offset' => 0, 'limit' => 1));
apiRequestJson("sendPhoto", array('chat_id' => my_id, 'photo' => $userPhotos['photos'][0][0]['file_id']));
apiRequestJson("sendPhoto", array('chat_id' => my_id, 'photo' => $userPhotos['photos'][0][1]['file_id']));
?>
Link to the telegram bot api: https://core.telegram.org/bots/api
I'd be thankfull for any help.