Posted by & filed under internet.

If we have Sharedaddy we probably would like that whoever twitts our blog, mentions our account through a ‘via @ourAccout’.

Sharedaddy has currently no support for this, but by editing a simple php file we can make it on our own.

First we must find the ‘sharing-souces.php’ file; if we have Sharedaddy activated through Jetpack it’s located at /wp-content/plugins/jetpack/modules/sharedaddy folder, otherwise at /wp-content/plugins/sharedaddy.

In the functionprocess_request we look for the line that begins:

$twitter_url = add_query_arg(

urlencode_deep( array_filter( compact( ‘via’, ‘related’, ‘text’, ‘url’ ) ) ),

sprintf( ‘%s://twitter.com/intent/tweet’, $this->http() )

and modify it so it loks like this:

$twitter_url = add_query_arg(

urlencode_deep( array_filter( compact( ‘via’, ‘related’, ‘text’, ‘url’ ) ) ),

sprintf( ‘%s://twitter.com/intent/tweet?via=USERNAME‘, $this->http() )

As simple as that

DISCLAIMER
Editing the file can make our blog inaccessible, its recommended to make a copy of the file 

2 Responses to “Agregar Tu Cuenta de Twitter a Sharedaddy”

Leave a Reply

  • (will not be published)