This is a migrated thread and some comments may be shown as answers.

Client-side API: setting title/url gets URL encoded

1 Answer 50 Views
SocialShare
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 10 Apr 2014, 12:19 PM
When I use the client side API to set the title and URL of my page to be shared, my page title gets URL encoded:

1.function OnSocialButtonClicking(sender, args) {
2.var url =  "http://www.telerik.com/"
3.var title = "test test test test test test"
4.args.set_stringsToShare(url, title)
5.}


the tweet message comes out URL encoded: "test%20test%20test%20test%20test%20test"

is there a way around this? It happens on pinterest, facebook too

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 15 Apr 2014, 08:05 AM
Hi Adam,

Setting the parameters to the sender, seems to fixes the issue on my side. For example:
JavaScript:
<script>
    function OnSocialButtonClicking(sender, args) {
        var url = "http://www.telerik.com/";
        var title = "test test test test test test";
        sender.set_stringsToShare(url, title);
    }
</script>
ASPX:
<telerik:RadSocialShare ID="RadSocialShare1" runat="server" OnSocialButtonClicking="OnSocialButtonClicking">
    <MainButtons>
        <telerik:RadSocialButton SocialNetType="ShareOnTwitter" TitleToShare="my title" UrlToShare="http://www.google.com" />
    </MainButtons>
</telerik:RadSocialShare>



Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
SocialShare
Asked by
Adam
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or