You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
New Direct Message endpoint needs to be implemented #587
Yes the version in the pull request is working for us. There are breaking changes to the function though, which is forced by Twitter's changes in the new direct message endpoint. Probably the biggest change is that screen name is no longer supported as a parameter, so we need to call api.GetUser first to get the user id.
added everything and fixed up the tests, changed the docs a few hours ago
to the 4.0 dev branch. sorry, been out of commission lately :(
Jeremy Low
JeremyLow@gmail.com
PostDirectMessage works for me now, but I'm still getting error 34 for GetDirectMessages and GetSentDirectMessages. Looks like these endpoints have been collapsed into "GET direct_messages/events/list". Is this supposed to work in 3.5?
@spacecab07 Yes, I have already confirmed that this works well - also check the code change. The API needs to make an extra call to Twitter now, so it is probably wise to retrieve and store the user_id in your own application once and use that at every DM post.
PostDirectMessage works for me now, but I'm still getting error 34 for GetDirectMessages and GetSentDirectMessages. Looks like these endpoints have been collapsed into "GET direct_messages/events/list". Is this supposed to work in 3.5?
Same here, I am at 3.5 can't GET , error 34 for GetDM and GetSentDM
Have the same PostDirectMessage issue and still do not get it done
api.PostDirectMessage(directmsg, user_id="xxx")
api.PostDirectMessage(directmsg, screen_name="xxx")
But all other works fine like
api.GetFriends(screen_name="xxx")
api.GetFriends(user_id="xxx")
So what else do I have to do in addition for direct mesages ???
Update:
Fix is not official released thus pip install does not work !
Download and install from local file system - now it's working again :-)
Many Thanks !!!
Could this please be made a priority for pushing a release to Pypi? Currently, according to what I've been able to figure out, there is no Twitter wrapper in Pypi that actually supports direct messages. I assume there's a number of applications that are badly broken by this and not just mine.
Hi, backing up @LuccoJ on this one, you're just one signature way from releasing the working code to pypi. Don't want to be pushy either, I have much respect for all the work you guys put in to maintain the code, but I have been following this thread since its inception and working direct messages can't come soon enough.
Started getting this error message last week, and as a relative noob to how the Twitter module work, am having issues figuring out if the problem is same as above. No changes were made to code, no updates to module etc; simply stopped working...
Seems like line 3044 is else line in following statement:
`if return_json:
return data
else:
return [DirectMessage.NewFromJsonDict(x) for x in data]
Activity
webtweakers commentedon Sep 20, 2018
I'm having the same issue, found the same cause, was looking for the same reason...
at0m1sk commentedon Sep 21, 2018
#579
There is a pull request that seems to integrate new endpoint. Request is from Aug 2018.
spacecab07 commentedon Sep 26, 2018
Any idea on when this might get resolved?
jmingtan commentedon Sep 28, 2018
Yes the version in the pull request is working for us. There are breaking changes to the function though, which is forced by Twitter's changes in the new direct message endpoint. Probably the biggest change is that screen name is no longer supported as a parameter, so we need to call api.GetUser first to get the user id.
ganmedia commentedon Sep 29, 2018
Any news about this? When will the pull request be integrated?
bear commentedon Sep 29, 2018
i'll look at this now
jeremylow commentedon Sep 29, 2018
bear commentedon Sep 29, 2018
@jeremylow do you want me to merge this to the master and bump the version to 3.6 since it's fixing a broken twitter?
jeremylow commentedon Sep 29, 2018
bear commentedon Sep 29, 2018
@jeremylow I think I can make the method signature stay the same to reduce the impact - if
screen_nameis nil then make the call, if not use itok, i'll merge the PR and see if that fixes things
bear commentedon Sep 29, 2018
I think I have it working and i've tagged a pre-release for v3.5
Can you all give this a go and see if it works - i'll hold off pushing this to PyPI until someone sanity checks it
webtweakers commentedon Sep 30, 2018
Thanks for picking this up. I've checked the v3.5 release and now things work again, as expected! Looking good from my side.
ganmedia commentedon Sep 30, 2018
Version 3.5 checked and everything working with no problems.
Great job.
jeremylow commentedon Sep 30, 2018
Good to go from me!
kennethdamica commentedon Oct 2, 2018
PostDirectMessage works for me now, but I'm still getting error 34 for GetDirectMessages and GetSentDirectMessages. Looks like these endpoints have been collapsed into "GET direct_messages/events/list". Is this supposed to work in 3.5?
spacecab07 commentedon Oct 4, 2018
Sorry if this is a noob question. So, i need the user_id of the recipient of the DM?
jeremylow commentedon Oct 4, 2018
@spacecab07 if you don’t supply it, the api will attempt to look up the user id from the screen name.
spacecab07 commentedon Oct 4, 2018
@jeremylow so should be ok to leave as 'user_id=None, screen_name=twitter_handle' ?
webtweakers commentedon Oct 4, 2018
@spacecab07 Yes, I have already confirmed that this works well - also check the code change. The API needs to make an extra call to Twitter now, so it is probably wise to retrieve and store the user_id in your own application once and use that at every DM post.
spacecab07 commentedon Oct 4, 2018
@webtweakers ok, thanks .
at0m1sk commentedon Oct 14, 2018
Same here, I am at 3.5 can't GET , error 34 for GetDM and GetSentDM
MHlinux commentedon Oct 27, 2018
Have the same PostDirectMessage issue and still do not get it done
api.PostDirectMessage(directmsg, user_id="xxx")
api.PostDirectMessage(directmsg, screen_name="xxx")
But all other works fine like
api.GetFriends(screen_name="xxx")
api.GetFriends(user_id="xxx")
So what else do I have to do in addition for direct mesages ???
Update:
Fix is not official released thus pip install does not work !
Download and install from local file system - now it's working again :-)
Many Thanks !!!
LuccoJ commentedon Nov 2, 2018
Could this please be made a priority for pushing a release to Pypi? Currently, according to what I've been able to figure out, there is no Twitter wrapper in Pypi that actually supports direct messages. I assume there's a number of applications that are badly broken by this and not just mine.
Artfulme commentedon Nov 2, 2018
Hi, backing up @LuccoJ on this one, you're just one signature way from releasing the working code to pypi. Don't want to be pushy either, I have much respect for all the work you guys put in to maintain the code, but I have been following this thread since its inception and working direct messages can't come soon enough.
jeremylow commentedon Nov 2, 2018
My apologies y'all; been a draining couple weeks. I thought the release had been uploaded to PyPI. I'll take care of it this weekend.
jeremylow commentedon Nov 3, 2018
3.5 is now on pypi.
Artfulme commentedon Nov 3, 2018
Thanks!
pacu commentedon Aug 5, 2019
I'm using 3.5 and I'm still getting the error 34. I also tried to install from github with same results. Am I'm missing something? How can I help?
JunksFiPenny commentedon Aug 23, 2019
Started getting this error message last week, and as a relative noob to how the Twitter module work, am having issues figuring out if the problem is same as above. No changes were made to code, no updates to module etc; simply stopped working...
Seems like line 3044 is else line in following statement:
`if return_json:
return data
else:
return [DirectMessage.NewFromJsonDict(x) for x in data]
`