vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Twitter - Tweet Button in SHOWTHREAD (https://vborg.vbsupport.ru/showthread.php?t=248569)

BirdOPrey5 11-07-2010 03:56 AM

I visited the 4.x site in your signature- I see you have the tweet counter disabled (data-count="none") what was the issue you were having with the counter? Sometimes I've seen twitter themselves show the wrong count for a few hours but eventually it gets 'fixed' - I guess Twitter themselves are still working out the bugs.

You also may want to try the option in post number 42 of this thread if you are having issues with the counter.

oldfan 11-07-2010 06:07 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2118912)
I visited the 4.x site in your signature- I see you have the tweet counter disabled (data-count="none") what was the issue you were having with the counter? Sometimes I've seen twitter themselves show the wrong count for a few hours but eventually it gets 'fixed' - I guess Twitter themselves are still working out the bugs.

You also may want to try the option in post number 42 of this thread if you are having issues with the counter.

i tried #42, once I tweet the post it says (1 tweet) once i surf again and go back to the post it says zero again.

BirdOPrey5 11-07-2010 07:18 PM

OK Try this... replace the existing Twitter code:
Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Replace with:
Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="http://www.example.com/forum/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
Be sure to change YOUR_TWITTER_USERNAME to your twitter username and http://www.example.com/forums/ with the URL of your forums...

This *should* fix all issues with the count disappearing when leaving a page and coming back.

oldfan 11-08-2010 01:06 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2119179)
OK Try this... replace the existing Twitter code:
Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Replace with:
Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="http://www.example.com/forum/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
Be sure to change YOUR_TWITTER_USERNAME to your twitter username and http://www.example.com/forums/ with the URL of your forums...

This *should* fix all issues with the count disappearing when leaving a page and coming back.

same thing, tweet count disappears
this is the code I used

Quote:

<div id="fb_likeframe" style="border: none; overflow: hidden; height: 27px; width: 95px; vertical-align: text-bottom; padding-top:1px;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="metallitweets" data-url="http://www.metallifukinca.com/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>{vb:raw fblikebutton}
</vb:if>

BirdOPrey5 11-08-2010 02:16 AM

The code looks absolutely right... I would just remove the canonical link element if you're not using it at this point... the URL showing in the canonical link is different than the url showing in the twitter code, which could be the problem.

oldfan 11-08-2010 04:04 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2119316)
The code looks absolutely right... I would just remove the canonical link element if you're not using it at this point... the URL showing in the canonical link is different than the url showing in the twitter code, which could be the problem.


ga? :eek:

BirdOPrey5 11-08-2010 02:25 PM

Quote:

Originally Posted by oldfan (Post 2119337)
ga? :eek:

I don't understand the question. :confused:

oldfan 11-08-2010 09:29 PM

Quote:

Originally Posted by oldfan (Post 2119337)
ga? :eek:

Basically I don't understand what you mean by

Quote:

I would just remove the canonical link element if you're not using it at this point... the URL showing in the canonical link is different than the url showing in the twitter code, which could be the problem.

BirdOPrey5 11-08-2010 10:43 PM

Ahhh... OK basically I went to this thread on your forum: http://www.metallifukinca.com/showthread.php?14228-test

And then I went to "View Source" in my browser.
Then on line 15 of the source you have this line:
Code:

<link rel="canonical" href="http://www.metallifukinca.com/showthread.php?14228-test" />
This is the canonical link element. I assume you added it when you followed the instructions in post 42... since it didn't solve the problem you should probably remove it. I think it would be in your headinclude template.

oldfan 11-09-2010 05:16 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2119678)
Ahhh... OK basically I went to this thread on your forum: http://www.metallifukinca.com/showthread.php?14228-test

And then I went to "View Source" in my browser.
Then on line 15 of the source you have this line:
Code:

<link rel="canonical" href="http://www.metallifukinca.com/showthread.php?14228-test" />
This is the canonical link element. I assume you added it when you followed the instructions in post 42... since it didn't solve the problem you should probably remove it. I think it would be in your headinclude template.

I removed the code from the headinclude, once you tweet the thread it goes to 1, once you refresh the 1 disappears again

BirdOPrey5 11-09-2010 10:43 AM

OK... I'll see if I can replicate the issue on my 4.0.8 test board...

oldfan 11-09-2010 11:53 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2119828)
OK... I'll see if I can replicate the issue on my 4.0.8 test board...

thanks :)

BirdOPrey5 11-09-2010 02:00 PM

OK I am getting the same issue on 4.0.8 now... I looked up some info and it seems Twitter is now caching the twitter count so it doesn't update in real time... I made a couple of test tweets and it still shows "0" when i go back... I'm going to give it some time and see if the correct count is eventually displayed.

This is official info from Twitter on the subject:
Quote:

My count doesn’t seem to be going up, is something wrong?

To improve performance we cache the count before displaying it. The cache is updated frequently but on some occasions it may look like your count is not increasing while the cache is updated. In addition, the count only includes public Tweets meaning a Tweet from a protected account will not cause an increase.

oldfan 11-10-2010 01:24 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2119878)
OK I am getting the same issue on 4.0.8 now... I looked up some info and it seems Twitter is now caching the twitter count so it doesn't update in real time... I made a couple of test tweets and it still shows "0" when i go back... I'm going to give it some time and see if the correct count is eventually displayed.

This is official info from Twitter on the subject:

Thanks for the info

oldfan 11-15-2010 12:37 PM

any luck?

BirdOPrey5 11-15-2010 07:49 PM

No, but I have found this is a widespread issue.. many bloggers posting about the exact same issue... no one can seem to find a rhyme or reason when it works or doesn't work. Hopefully twitter is working on the issue, I'd imagine they have to know about it considering how wide spread the issue is. All I can suggest for no is to disable the count or let your members know the count isn't working right yet... I'd imagine someday it will just start working when Twitter fixes the issue.

I went through about 10 different options using canonical links, data-url, and count-url options for the twitter tag and using both "basic" friendly and "advanced" friendly URL's in vbulletin and nothing worked.

I wish I knew if it was something new in 4.0.8 or if older VB4 versions also stopped counting- not that I'm in a position to do much about it but it would be nice to know.

Anyone with VB4 have this still working right?

123_y_321 11-29-2010 01:04 PM

ok, when I click the tweet button this is what I get

Quote:

'url' parameter does not contain a valid URL.
How can I fix this?

BirdOPrey5 11-29-2010 01:13 PM

Can you paste the exact text/code for the twitter button you are using in your template?

123_y_321 11-29-2010 01:17 PM

here is my code

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="MY USER NAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

BirdOPrey5 11-29-2010 01:27 PM

Quote:

Originally Posted by 123_y_321 (Post 2127140)
here is my code

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="MY USER NAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Do you have accented/non-english characters in your URL? Some people have mentioned problems with that before... in any case try this:

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="http://www.example.com/forum/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
Replace "YOUR_TWITTER_USEENAME" and also replace http://www.example.com/forum/ with the URL to your forums.

123_y_321 11-29-2010 01:34 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2127141)
Do you have accented/non-english characters in your URL? Some people have mentioned problems with that before... in any case try this:

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="http://www.example.com/forum/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
Replace "YOUR_TWITTER_USEENAME" and also replace http://www.example.com/forum/ with the URL to your forums.

Thanks for your reply! Yes, there are non-English chars in my urls. And I have tried your way; replace everything that I support to. But no luck.

BirdOPrey5 11-29-2010 01:41 PM

OK, I got 1 more trick up my sleeve... Give me a few minutes to test it... will reply back once I make sure it works.

BirdOPrey5 11-29-2010 01:56 PM

OK... use this code... remember to replace the username with your own...

This should remove all the special characters from your URL so it should work with twitter... please let me know.

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

123_y_321 11-29-2010 02:15 PM

you are the best. It works like a charm. Thank you very much.

BirdOPrey5 11-29-2010 02:47 PM

Glad to hear it... :up:

123_y_321 11-29-2010 04:20 PM

I tweet just fine but the count just stay as 0. Can you please review this once more time? Thank you.

BirdOPrey5 11-29-2010 04:38 PM

Yeah the count issue is a widely reported problem, some people are affected some aren't, there so far doesn't seem to be a rhyme or reason to it. One option is to disable the count completely by changing "horizontal" to "none" in the code.

One thing I would try first though is this code which tells it to specifically count the URL you're twittering:

Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}" data-counturl="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

123_y_321 11-29-2010 08:21 PM

wont work; i think I will disable the count completely. Thank you for your help.

oldfan 12-11-2010 01:23 PM

still no luck with this?

BirdOPrey5 12-11-2010 10:03 PM

nothing yet. :(

Seawolf 01-06-2011 04:30 PM

Is there a way to have it show the follow-up screen that suggests to follow a user after they click tweet.... namely the user that I'm already inserting for the "via" part of the tweet? Thanks.

BirdOPrey5 01-06-2011 05:42 PM

They should already see the 'via' user as a suugested follower- if it's not YOU tweeting since you can't follow yourself... you can add an additional suggested follow by adding:

Code:

data-related="2ndUSERNAME"
to the twitter code, so:
Code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-related="2ndUSERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

OldSchoolDSL 01-07-2011 02:51 AM

Installed and I believe its working (not planning on setting up a 2nd tweet account to test from a 3rd party view). But I was able to tweet myself using the original code.

4.1 PL2

justphil 01-07-2011 08:24 AM

I don't think it's working for me. It installed correctly, but when I click the Tweet button, it says that Twitter is over capacity. But in another window I am logged into Twitter and it's working fine/not at capacity...
Also, I am using the mod that works WITH the Facebook one built-in to vB 4.x.

EDIT: This is the url from the Twitter pop-up window: "http://twitter.com/share?_=1294397124377&count=horizontal&original_re ferer=http%3A%2F%2Fslayalive.c om%2Fshowthread.php%2F758-New-Feature-Tweet-This!%3Fp%3D12354&text=New%20Feature%3A%20Tweet%20 This!&url=http%3A%2F%2Fslayali ve.comshowthread.php%2F758-New-Feature-Tweet-This!&via=SlayAliveForum"

Doesn't seem right. I hope this can be fixed because I really want to use this!

BirdOPrey5 01-07-2011 12:16 PM

Your info appears correct- Twitter could use different severs for the "Tweet This" button then they do their regular site so it's possible one is over capacity while the other still works- in fact I'm fairly sure different sites tweet buttons get handled by different servers- I would give it a few hours and try again before worrying too much.

If you want me to take a look you can post your exact twitter code used in the template here and I'll double check it for anything suspicious.

justphil 01-07-2011 05:52 PM

Looks like this only happens when there are special characters in the thread title, i.e - !?.,@ and so on. Threads that do not include special characters in the title work fine. Otherwise I get that "at capacity" message. Weird.

BirdOPrey5 01-07-2011 06:06 PM

See post #143 in this thread to fix the non-English character issue.

OldSchoolDSL 01-07-2011 10:32 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2145561)
See post #143 in this thread to fix the non-English character issue.

I used the original code in the 1st post (for those of use who want to use Facebook and Twitter).

But I also have vBet which translates my community in a wide range other then English. Should I use the code also or did you update the 1st post to include the fix in post #143?

BirdOPrey5 01-07-2011 11:30 PM

Post 143 isn't necessary for most people do I didn't include it in post # 1...

The combined code from post 1 and 143 you should use is:

Code:

<div id="fb_likeframe" style="border: none; overflow: hidden; height: 27px; width: 95px; vertical-align: text-bottom; padding-top:1px;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>{vb:raw fblikebutton}

OldSchoolDSL 01-07-2011 11:48 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2145689)
Post 143 isn't necessary for most people do I didn't include it in post # 1...

The combined code from post 1 and 143 you should use is:

Code:

<div id="fb_likeframe" style="border: none; overflow: hidden; height: 27px; width: 95px; vertical-align: text-bottom; padding-top:1px;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="{vb:raw vboptions.bburl}/showthread.php?t={vb:raw threadid}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>{vb:raw fblikebutton}

Thank you so very much. :)


All times are GMT. The time now is 08:21 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.13286 seconds
  • Memory Usage 1,851KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_code_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete