开发者

Using AddThis SDK for iOS, Need to change "via @AddThis" for default Twitter text

First ever SO question, woohoo.

I've integrated the AddThis SDK into an iOS app. I've set it up to share the App Store link to the App via various channels. All works well except the default text in the Twitter message appends "via @AddT开发者_运维百科his" to the end of the tweet. Although this text is editable by the user, I'd like to change it to "via @MyTwitterHandle".

AddThis' documentation says you can use:

[AddThisSDK setTwitterViaText:@"MyTwitterHandle"];

Except this doesn't work. It raises a warning that AddThisSDK may not respond to the method call and the app crashes when it reaches this line.

Examining the AddThisSDK header file, there's no such method outlined. I've searched their forums and FAQ etc to no avail. And I did run into other instances where the method names in their documentation were different from those in the SDK. If that's the case here I haven't found the correct name. Does anyone know how to do this?

Thanks in advance.


Do you have the latest version of the addthis iOS sdk? http://www.addthis.com/help/ios-quickstart


Please set setTwitterViaText before the sharing code.

This will work:

[AddThisSDK setTwitterViaText:@"My App"];
[AddThisSDK shareURL:myUrl withService:@"twitter" title:@"myTitle" description:myDescription];

This will not work:

[AddThisSDK shareURL:myUrl withService:@"twitter" title:@"myTitle" description:myDescription];
[AddThisSDK setTwitterViaText:@"My App"];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜