No results found for sharing via Twitter (share on mobile only): Error
P粉486743671
P粉486743671 2023-12-07 10:54:26
0
1
383

I have a simple sharing button for Facebo ok, Twitter and Pinterest

<a href="<?php echo "$base_url/share.php"; ?>" class="btn btn-default btn-face book btn-icon btn-block" target="popup" 
onclick="window.open('<?php echo "$base_url/share.php?id=$id&share=fb&type=article"; ?>','popup','width =600,height=600'); return false;"><i class="fab fa-face book"></i> <span class="post-sharing__label d-none d-sm-inline-block">Share on Face book</span></a>

<a href="<?php echo "$base_url/share.php"; ?>" class="btn btn-default btn-twitter btn-icon btn-block" target="popup" 
onclick="window.open('<?php echo "$base_url/share.php?id=$id&share=tw&type=article"; ?>','popup','width=600,height=600'); return false;"><i class="fab fa-twitter"></i> <span class="post-sharing__label d-none d-sm-inline-block">Share on Twitter</span></a>

<a href="<?php echo "$base_url/share.php"; ?>" class="btn btn-default btn-twitter btn-icon btn-block" target="popup" 
onclick="window.open('<?php echo "$base_url/share.php?id=$id&share=tw&type=article"; ?>','popup','width=600,height=600'); return false;"><i class="fab fa-twitter"></i> <span class="post-sharing__label d-none d-sm-inline-block">Share on Twitter</span></a>

When the user clicks share, it goes to a php file called share.php; this file gets information about the page that will be shared.

if ($share =="tw"){     

header("Location: http://twitter.com/share?text=$seo_description&url=$share_url");
die();
}

On desktop it works fine but on mobile I get the following error

The terms you entered did not bring any results, please try again later.

Facebo k and Pinterest run on mobile and I'm struggling to figure out why I'm getting this.

I'm signed into the same Twitter account on my phone that I'm signed into on my computer.

I got the information for my URL from this question

P粉486743671
P粉486743671

reply all(1)
P粉770375450

I ran this on mobile by changing the link

if ($share =="tw"){     

header("Location: http://twitter.com/share?text=$seo_description&url=$share_url");
die();
}

Here

if ($share =="tw"){     

header("Location: https://twitter.com/intent/tweet?text=$seo_description&url=$share_url");
die();
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!