Home / Topic / Send the link of my app to facebook, twitter, whatsapp

Send the link of my app to facebook, twitter, whatsapp

Home Kwiksher Forums Help me! Send the link of my app to facebook, twitter, whatsapp

Viewing 2 posts - 1 through 2 (of 2 total)
  • victortarinteclas
    Participant
    #85279

    Hi Yamamoto,

    I have read your tutorial on how to send a screenshot to facebook or twitter.

    I wanted to ask if you can do that instead of sending a screenshot, send the link of my app in the appstore.

    Would it be too complicated to do this? If you could explain it I would be very grateful.

    Another question, how can I make the “whatsapp” app open from my Kwik app?

    Thank you very much

    Best regards,

    Yamamoto
    Keymaster
    #85284

    remove the lines of display.save and post_tw_code.lua or post_fb_code.lua
    set “entireGroup.png” as nil
    change the message as you like

    ORIGINAL

    
    local centerX = display.contentCenterX
    local centerY = display.contentCenterY
    
    local screenCap = display.save( sceneGroup, { filename="entireGroup.png", baseDir=system.DocumentsDirectory, isFullResolution=true, backgroundColor={0, 0, 0, 0} } )
    
    -- Handler that gets notified when the alert closes
    local function onComplete( event )
       if event.action == "clicked" then
            local i = event.index
            if i == 1 then
                ---------------------------
                --
                ---------------------------
              layer.social_status = display.newText("", centerX, centerY, native.systemFont, 36)
              layer.social_status:setFillColor( 1,0,0 )
              -- social.post("twitter", "hello", "pic.png", layer) -- system.DocumentsDirectory
              composer.social.post("twitter", "hello", "entireGroup.png", layer) -- system.DocumentsDirectory
            elseif i == 2 then
                --
                -- user canceled
                --
            end
        end
    end
    
    -- Show alert with two buttons
    local alert = native.showAlert( "Post", "Upload a screenshot?", { "OK", "No" }, onComplete )
    

    Modified

    
    local centerX = display.contentCenterX
    local centerY = display.contentCenterY
    
    -- Handler that gets notified when the alert closes
    local function onComplete( event )
       if event.action == "clicked" then
            local i = event.index
            if i == 1 then
                ---------------------------
                --
                ---------------------------
              layer.social_status = display.newText("", centerX, centerY, native.systemFont, 36)
              layer.social_status:setFillColor( 1,0,0 )
              composer.social.post("twitter", "hello", nil, layer) -- system.DocumentsDirectory
            elseif i == 2 then
                --
                -- user canceled
                --
            end
        end
    end
    
    -- Show alert with two buttons
    local alert = native.showAlert( "Post", "Send message", { "OK", "No" }, onComplete )
    

    For whats app, you need the following code to open whatsapp

    
     system.openURL("whatsapp://send?text=Hello%2C%20World!")
    

    https://forums.coronalabs.com/topic/45399-share-text-or-image-using-whatsapplinepinterest/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd

Functionality

WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-

Performance

google analytic

__utma,__utmb,__utmc,__utmz,_ga,_gid,_gat

Advertising