viezel / TiSocial.Framework

iOS6+ Social.Framework. Appcelerator apps are able to share content to Facebook and Twitter.
MIT License
259 stars 102 forks source link

Added platformAppendText #151

Closed timanrebel closed 5 years ago

timanrebel commented 9 years ago

The guys from Soften.net asked me to extend this module, with a custom text that can be added per share provider. Possible values are: "twitter", "message", "whatsapp" or the id of the extension like "com.buffer.buffer.BufferComposeExtension". Facebook is not included, because the new FacebookSDK only allows for sharing URLs. The module has been adapted to adhere to this new Facebook rule as well.

Example:

Social.activityView({
    text:"share like a king!",
    subject:"I would like to share this with you",
    image:"pin.png",
    removeIcons:"print,sms,copy,contact,camera,mail",
    emailIsHTML : false,

    platformAppendText: {
        twitter: ' via @twitter #twitter',
        message: ' via www.example.com',
        whatsapp: ' via 555-1234567',
        'com.buffer.buffer.BufferComposeExtension': ' via Buffer'
    }

},[
    {
        title:"Custom Share",
        type:"hello.world",
        image:"pin.png",
        callback: function(e) {
            alert("You chose me!");
        }
    },
    {
        title:"Open in Safari",
        type:"open.safari",
        image:"safari.png"
    }
]);
caspahouzer commented 9 years ago

+1

viezel commented 8 years ago

wow, sorry I totally missed the PR @timanrebel . if this is still relevant, would you care to update your PR, cause I cannot merge it atm.