corebird icon indicating copy to clipboard operation
corebird copied to clipboard

Add a way to request that Corebird display a specific tweet

Open catern opened this issue 10 years ago • 6 comments
trafficstars

I would envision this as being a DBUS method, OpenTweet, which takes a string that is the tweet ID. Maybe there would also be OpenUser which would open the page given a specific user.

As a further enhancement, perhaps there could be an OpenURL method which would take a string that is a URL to twitter.com, figure out what the URL points to (a tweet or a user page), and show that thing. This logic might be shared with other components in Corebird?

Use cases:

  • I have some tweet ID in another application which knows about Twitter, and if I detect Corebird is running I prefer to show the tweet in Corebird rather than the browser.
  • I receive a link to twitter.com outside of Corebird, and I'd like to view it inside Corebird.
  • I want to quickly move from using twitter.com in my browser to using Corebird.

catern avatar Mar 01 '15 04:03 catern

I have a test of this in the dbus branch now, but using a show-profile action and e.g.

gdbus call --session --dest org.baedert.corebird --object-path /org/baedert/corebird --method org.gtk.Actions.Activate 'show-profile' "[<@x 118055879>]" "{}"

Seems to work.

baedert avatar Mar 01 '15 19:03 baedert

That works great! But wouldn't it be better to expose a method that takes a Twitter screen name rather than a Twitter ID? To go from a screen name to an ID takes Twitter API stuff that Corebird already implements, right? And in most cases, if an external application wants to show a profile, and they aren't capable of displaying it themselves, they will have a string that is a Twitter screen name, rather than a Twitter ID.

catern avatar Mar 03 '15 02:03 catern

Yeah, the id here is really just because we use a id in ProfilePage. Since profile URLs use the users's handle, we should probably just use that for profiles, and the tweet id when showing tweets.

baedert avatar Mar 03 '15 09:03 baedert

Oh, I changed the type of the action to a string and it now takes the screen_name, btw. It gets a bit ugly in ProfilePage because of the screen_name/id duality (but it's not like it was beautiful before...).

baedert avatar Mar 07 '15 17:03 baedert

@baedert

Oh, I changed the type of the action to a string and it now takes the screen_name

screen_name as Twitter user name? Can you give an example. I tried with d-feet, but it is not working may be because i am not constructing it properly.

  1. gdbus call --session --dest org.baedert.corebird --object-path /org/baedert/corebird --method org.gtk.Actions.Activate 'show-profile' "[<@x 118055879>]" "{}"

What are other gtk.actions other than 'show-profile' ?

khurshid-alam avatar Mar 26 '17 07:03 khurshid-alam

It's all just in the dbus branch which I haven't touched in ages.

baedert avatar Mar 26 '17 11:03 baedert