0

Magento2 Share product link for WhatsApp Web with bitly link

how to currentUrl share with bitly link?

$objectManagerInstance=\Magento\Framework\App\ObjectManager::getInstance();

$url = $objectManagerInstance -> get('Magento\Framework\UrlInterface');

$currentUrl = $url -> getCurrentUrl();

<div class="whatsapp_share <?php echo $size_class; ?>">
  <a href="whatsapp://send?text=<?php echo $text?>%0A%0A<?php echo "",$currentUrl."";?>"><?php echo __('Share');?></a>
</div>  
0

Please try with below link for share products in whatsapp ( for bitly link - can you share url format ? ) .

https://web.whatsapp.com/send?text=www.google.com

I hope its work for you.

0

I guess, that you want to generate a product link, using the bit.ly API, that can easily be shared using WhatsApp?

And you should be done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.