Passing username when a link is shared


(Admir Hodzic) #1

I am trying to build plugin for custom sharing which will call my website.
What I want is to capture user who is shared post.

When I look way to generate URI for sharing i see that there is “link” and “title” variable to add in request.
I am wondering is there a way to pass current user name ? What will be name for that variable ?
Also is there variable for exact topic / post number ?

  generateUrl: function(link, title) {
        return "http://twitter.com/intent/tweet?url=" + encodeURIComponent(link) + "&text=" + encodeURIComponent(title);
      },

(Robin Ward) #2

There’s no way to do this right now but I would accept a PR to provide it if you are willing to do the work :smile:

Basically you’d have to pass extra stuff to generateUrl from the share controller in ember.