MyTurn-OpenSource / kik-bot-python-example

Other
0 stars 0 forks source link

profile pics don't show #2

Closed jcomeauictx closed 7 years ago

jcomeauictx commented 7 years ago

bot always says I don't have a profile pic when I do. or in @DavidStodolsky's case it showed a silhouette instead of the actual photo.

jcomeauictx commented 7 years ago

seems to be a bug in the API itself:

>>> import requests
>>> requests.get('https://api.kik.com/v1/user/jcomeauictx', auth=(BOT_USERNAME, BOT_API_KEY))
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kik.com
DEBUG:urllib3.connectionpool:https://api.kik.com:443 "GET /v1/user/jcomeauictx HTTP/1.1" 200 107
<Response [200]>
>>> _.json()
{u'timezone': None, u'profilePicUrl': None, u'firstName': u'John', u'profilePicLastModified': None, u'lastName': u'Comeau'}
jcomeauictx commented 7 years ago

but:

>>> requests.get('https://api.kik.com/v1/user/davidsanderss', auth=(BOT_USERNAME, BOT_API_KEY))
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kik.com
DEBUG:urllib3.connectionpool:https://api.kik.com:443 "GET /v1/user/davidsanderss HTTP/1.1" 200 179
<Response [200]>
>>> _.json()
{u'timezone': u'Europe/Copenhagen', u'profilePicUrl': u'https://cdn.kik.com/user/pic/davidsanderss/big', u'firstName': u'David', u'profilePicLastModified': 1480412432564L, u'lastName': u'Stodolsky'}
jcomeauictx commented 7 years ago

maybe kik is just slow to update their database. a few minutes ago I checked the URL https://cdn.kik.com/user/pic/jcomeauictx/big and got the silhouette. a few minutes later I got the photo I had added an hour or so before. now I've taken a photo on the other BLU phone and that shows as my profile photo but it's on on cdn yet. and the API still returns None.

jcomeauictx commented 7 years ago

from David: "Just tried it again and got the same result. So, I doubt it is just a delay. If it is. then it should be regarded as a bug."

jcomeauictx commented 7 years ago

OK, but there seem to be 2 separate bugs: one in the API itself, and one that may be in the API, in the Python bindings of the API, or the bot code.

the first is the failure to update the API. my profile pic has been active over 12 hours now and the API still returns None.

the second is that the API returns a link to your profile pic, the link when viewed shows your actual profile photo, but the bot doesn't display it.

jcomeauictx commented 7 years ago

I have no clue where to report an API bug. googling only shows in-app bug reporting. any ideas, @DavidStodolsky?

DavidStodolsky commented 7 years ago

We are just trying to get the example running. Can't you report the issues in their repo?

jcomeauictx commented 7 years ago

I guess so, although the first is upstream of that code, and the second is likely upstream as well.

DavidStodolsky commented 7 years ago

The important thing is that they know of the problem. We can wait for a fix.

jcomeauictx commented 7 years ago

try it now. it's working for me.

jcomeauictx commented 7 years ago

submitted pull request upstream: https://github.com/kikinteractive/kik-bot-python-example/pull/2

jcomeauictx commented 7 years ago

@DavidStodolsky please verify correct behavior now so I can close this.

DavidStodolsky commented 7 years ago

Verified