Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter User Mentions feed #153

Open
skpy opened this issue Jul 5, 2018 · 5 comments
Open

Twitter User Mentions feed #153

skpy opened this issue Jul 5, 2018 · 5 comments

Comments

@skpy
Copy link

skpy commented Jul 5, 2018

Twitter offers an API endpoint for user mentions. It would be grand if I could subscribe to this from Granary.

@snarfed
Copy link
Owner

snarfed commented Jul 5, 2018

yes! thanks for filing. i looked at that API endpoint originally, but shied away from it since it only works for the authenticated user, not arbitrary usernames:

granary/granary/twitter.py

Lines 415 to 418 in 2310f03

# get mentions of this tweet's author so we can search them for replies to
# this tweet. can't use statuses/mentions_timeline because i'd need to
# auth as the user being mentioned.
# https://dev.twitter.com/docs/api/1.1/get/statuses/mentions_timeline

...but that's a totally reasonable limit to impose.

@snarfed snarfed added the now label Jul 5, 2018
@snarfed
Copy link
Owner

snarfed commented Jul 5, 2018

note to myself: i'd probably add the special case for the authenticated user to fetch_mentions():

https://granary.readthedocs.io/en/latest/source/granary.html#granary.twitter.Twitter.fetch_mentions

def fetch_mentions(self, username, tweets, min_id=None):

not sure how i'd expose it in the API and/or the web UI yet.

@skpy
Copy link
Author

skpy commented Jul 10, 2018

Sorry if I'm missing something obvious, but isn't Granary authenticating to Twitter as me already? Or is it authenticating as your application ID and I'm simply granting that ID read access to my Tweets?

@snarfed
Copy link
Owner

snarfed commented Jul 10, 2018

heh, yes. the missing part is the statuses/mentions_timeline API call, and the new REST endpoint, UI, etc we'll need for it, not authentication.

@snarfed snarfed removed the now label Jul 23, 2018
@snarfed
Copy link
Owner

snarfed commented Apr 6, 2023

Twitter is now developer-hostile, so I don't plan to work on this myself. I'll happily review and merge PR(s) though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants