Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on January 11, 2015, 03:21:09 PM

Title: Auto Tweet Embed
Post by: vbgamer45 on January 11, 2015, 03:21:09 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=3991)

This modification auto embeds twitter tweets in your forum. Caches the result since twitter has a limit of how many api calls per site that can be called at a time.

Developed by  L'arri
Packaged and modified by vbgamer45 https://www.smfhacks.com

Adds jquery to your forum hosted on cloudfare cdn

4.0.3
!Handle x.com better, api workaround.

4.0.2
+Better handling of query string

4.0.1
+Support x.com links

4.0
!Changed url for the api.

3.0
+Added support for twitter urls with data after the ? sign thanks to live627


2.1
!Updated jquery version to fix issues in SMF 2.1.x now uses save version as 2.1

2.0
+Added support to Emoji's thanks to Arantor for changes needed

1.1
Changed end point

1.0.1
!Updated jquery library to use https


Licensed under: https://creativecommons.org/licenses/by-nd/4.0/ Attribution-NoDerivs
CC BY-ND
Title: Re: Auto Tweet Embed
Post by: nsno on January 12, 2015, 02:20:33 PM
excellent work!
Title: Re: Auto Tweet Embed
Post by: akbora on January 12, 2015, 04:57:27 PM
great and awesome works perfect...
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on January 12, 2015, 05:20:47 PM
Glad you enjoy the mod!
Title: Re: Auto Tweet Embed
Post by: dimspace on January 29, 2015, 12:49:51 PM
Excellent, thanks again for developing, improving and packaging this.
Title: Re: Auto Tweet Embed
Post by: luuuciano on March 02, 2015, 06:14:05 AM
Nice mod, thanks!

BTW, it would be better to use something like this?


<script type="text/javascript">!window.jQuery && document.write(unescape('%3Cscript src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"%3E%3C/script%3E'))</script>

Title: Re: Auto Tweet Embed
Post by: Krissnikkers on May 31, 2015, 03:24:48 AM

Ok so I am thick....  How do you use this mod?

Tried the embed code that didn't work and then tired just the link and that didn't work either...  :(

Thanks in advance

Kriss :)
Title: Re: Auto Tweet Embed
Post by: Antes on May 31, 2015, 03:33:45 AM
You just need to paste the link of the tweet (like: https://twitter.com/CNNMoney/status/604905917272891392) - Modification does the rest for you.
Title: Re: Auto Tweet Embed
Post by: Krissnikkers on May 31, 2015, 03:37:15 AM

I tried that and all I got was the link and nothing else...  :(
Title: Re: Auto Tweet Embed
Post by: Antes on May 31, 2015, 03:52:36 AM
I installed the mod, it embeds but w/o styling. Seems like a problem from twitter side.
Title: Re: Auto Tweet Embed
Post by: Krissnikkers on May 31, 2015, 03:54:35 AM

Thank god...  means I am not stupid  ;D

Will see if the mod designer can do anything..  :)

Thanks for your help!

Kriss :)
Title: Re: Auto Tweet Embed
Post by: Antes on May 31, 2015, 04:14:12 AM
oh wait scratch the last post I made, mods working perfectly, do you have ghostery or alike blocker? If you block twitter embed js it won't show with style.
Title: Re: Auto Tweet Embed
Post by: Krissnikkers on May 31, 2015, 04:17:09 AM

As I have never heard of those I will presume no.. :D I have a like mod though

Kriss :)
Title: Re: Auto Tweet Embed
Post by: Kr1sp3r on June 18, 2015, 09:22:17 PM
I just installed this mod, but I am getting this error:-

Database Error
Incorrect string value: '\xF0\x9F\x94\x8A\xF0\x9F...' for column 'html' at row 1
File: /usr/home/chems/forum/www/tweet-cache.php
Line: 94

Any ideas?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 18, 2015, 10:33:14 PM
What kind of language set are you using?
Title: Re: Auto Tweet Embed
Post by: Kr1sp3r on June 18, 2015, 10:53:58 PM
The default is English ISO-8859-1.

I did notice when the mod installed that there was no /Themes/default/languages/Modifications.english-utf8.php file to modify, only /Themes/default/languages/Modifications.english.php.

I am just helping out with this site and don't know a lot about SMF, can you suggest a fix? Thanks.
Title: Re: Auto Tweet Embed
Post by: villasg on June 19, 2015, 03:24:51 AM
Hi .
In my 2.0.10 greek-utf8 do not work .
I have change ( add ) autotwitter.xml as follow

<file name="$languagedir/Modifications.greek-utf8.php">
<operation>
<search position="end" />
<add><![CDATA[
// Begin Auto Embed Twitter Strings
$txt['autotwitter_tweeterror'] = 'Tweet error (does not exist)';
$txt['autotwitter_blankid'] = 'Tweet error (blank ID)';
// END Auto Embed Twitter Strings
]]></add>
</operation>
</file>

Installed without errors .
But after test do not show tweets .
Need some configuration ?
Title: Re: Auto Tweet Embed
Post by: helyea on July 17, 2015, 07:56:19 AM
My tweet dont embed

Title: Re: Auto Tweet Embed
Post by: JTVaughn on September 11, 2015, 07:22:45 AM
Tweets aren't embedding for me. Console shows this error:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Any ideas?
Title: Re: Auto Tweet Embed
Post by: luuuciano on September 11, 2015, 08:35:40 AM
Quote from: JTVaughn on September 11, 2015, 07:22:45 AM
Tweets aren't embedding for me. Console shows this error:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Any ideas?

Temporary twitter fault? it works here...

Oh, it looks like I was using this one finally http://custom.simplemachines.org/mods/index.php?mod=3837 ... not the one of this thread
Title: Re: Auto Tweet Embed
Post by: JTVaughn on September 11, 2015, 08:47:13 AM
Quote from: luuuciano on September 11, 2015, 08:35:40 AM
Quote from: JTVaughn on September 11, 2015, 07:22:45 AM
Tweets aren't embedding for me. Console shows this error:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Any ideas?

Temporary twitter fault? it works here...

Oh, it looks like I was using this one finally http://custom.simplemachines.org/mods/index.php?mod=3837 ... not the one of this thread

I tried that one too and have problems with that one, I posted in that thread too :( Can't get either to work right
Title: Re: Auto Tweet Embed
Post by: luuuciano on September 11, 2015, 03:41:29 PM
Well... I have the emoticon issue too... I do not care for the moment :-D
Title: Re: Auto Tweet Embed
Post by: Stampie on November 25, 2015, 05:55:07 AM
can i use this inside blocks? i tried it but it can't... or is there any mods that can automatically shows my tweets to the forum?
Title: Re: Auto Tweet Embed
Post by: Gluz on November 25, 2015, 07:29:12 AM
Quote from: Stampie on November 25, 2015, 05:55:07 AM
can i use this inside blocks? i tried it but it can't... or is there any mods that can automatically shows my tweets to the forum?
If you want your account tweets in a portal block or similar, the easy way is make a widget in Twitter and use a block with custom HTML code in it.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on January 10, 2017, 08:10:05 PM
Update

1.0.1
!Updated jquery library to use https
Title: Re: Auto Tweet Embed
Post by: natcip on January 24, 2017, 09:57:29 AM
I got an error message when I ran the install.php. :-\
How do I manually install the content of install.php (it's not the first time my server had a problem running those files)
Title: Re: Auto Tweet Embed
Post by: Shambles on January 24, 2017, 10:02:31 AM
Quote from: natcip
I got an error message when I ran the install.php. :-\

And you can't say what that error message was?
Title: Re: Auto Tweet Embed
Post by: natcip on January 24, 2017, 10:26:01 AM
Quote from: Shambles on January 24, 2017, 10:02:31 AM
Quote from: natcip
I got an error message when I ran the install.php. :-\

And you can't say what that error message was?
It's interfering with another modification

Quote
Warning: Missing argument 2 for BBCode_Instagram_Embed(), called in /home/www/***/Sources/Subs.php on line 1734 and defined in /home/www/***/Sources/Subs-BBCode-Instagram.php on line 103

Warning: Missing argument 3 for BBCode_Instagram_Embed(), called in /home/www/***/Sources/Subs.php on line 1734 and defined in /home/www/***/Sources/Subs-BBCode-Instagram.php on line 103

Warning: Missing argument 4 for BBCode_Instagram_Embed(), called in /home/www/***/Sources/Subs.php on line 1734 and defined in /home/www/***/Sources/Subs-BBCode-Instagram.php on line 103

And this is what's in line 1734 in Subs.php:
BBCode_Instagram_Embed($message);

and line 103 in Subs-BBCode-Instagram.php:
function BBCode_Instagram_Embed(&$message, &$smileys, &$cache_id, &$parse_tags)
Title: Re: Auto Tweet Embed
Post by: Firehawk77 on April 25, 2017, 05:48:53 PM
I installed this today, didnt get any errors or anything.  I dont get any embeds though , the Tweet links are the only thing that still show on the forum


any ideas what could be wrong?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on April 25, 2017, 06:00:46 PM
What is an exact tweet link on your forum that is not embedding?
Title: Re: Auto Tweet Embed
Post by: Firehawk77 on April 26, 2017, 10:25:32 AM
Quote from: vbgamer45 on April 25, 2017, 06:00:46 PM
What is an exact tweet link on your forum that is not embedding?

I just copied and pasted a few tweet links...theres no BBC code to use, its just supposed to embed auto right?


http://www.illini-nation.net/forum/index.php?topic=27240.msg416495#msg416495
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on April 26, 2017, 01:45:13 PM
I see the issue
Fix the file permissions on http://www.illini-nation.net/forum/tweet-cache.php
Make it 755 or 644


I tested and it embeds on my forum.
Title: Re: Auto Tweet Embed
Post by: Firehawk77 on April 26, 2017, 03:12:30 PM
Quote from: vbgamer45 on April 26, 2017, 01:45:13 PM
I see the issue
Fix the file permissions on http://www.illini-nation.net/forum/tweet-cache.php
Make it 755 or 644


I tested and it embeds on my forum.

changed to 644, that did it! thanks!
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on April 26, 2017, 03:26:48 PM
Glad to help. I went U of I Champaign as well.
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 10, 2017, 04:38:57 AM
Hello,

The twitter mod is not working properly. There is no error and I cannot figure it out what could be the issue. Any advice please?
Here is an example: http://forum.mkreef.com/index.php?topic=10824.msg173258#msg173258

Thanks!
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 10, 2017, 07:25:02 AM
You have the same error has previous poster
http://forum.mkreef.com/tweet-cache.php
Fix the file permissions
Make it 755 or 644
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 10, 2017, 07:49:02 AM
The permissions are already 755 and it won't work with 644 either.  :(
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 10, 2017, 08:06:02 AM
Try 777 and make sure it is owned by the correct user
Make sure the file exists at http://forum.mkreef.com/tweet-cache.php
You shouldn't get a 403 error when you visit the page.
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 10, 2017, 08:15:29 AM
If I use 777 the whole forum won't work. I got error 403.
And also tweet-cache.php file is in the root of the forum
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 10, 2017, 08:18:35 AM
Something isn't right then with file permissions or file ownership of that file I would compare to the other files that are there or check your servers error log for more informatoin
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 10, 2017, 08:27:05 AM
Quote from: vbgamer45 on May 10, 2017, 08:18:35 AM
Something isn't right then with file permissions or file ownership of that file I would compare to the other files that are there or check your servers error log for more informatoin
I don't have a clue how to solve these issues what you have mention.
Please for advise?  :(
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 10, 2017, 08:28:21 AM
I would try to get your hosting provider to look into then they may have an idea.
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 10, 2017, 04:16:51 PM
SOLVED!
Issue was on file without 755 permission.

Thanks!
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 10, 2017, 04:28:33 PM
Glad you have it working!
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on May 12, 2017, 07:49:20 AM
This mod stop embedding. please how can I fix the error.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 12, 2017, 08:29:57 AM
Link to forum that has the twitter post
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on May 12, 2017, 08:37:05 AM
Quote from: vbgamer45 on May 12, 2017, 08:29:57 AM
Link to forum that has the twitter post

This is the link

http://spyloadedtv.com/politics-news/buhari-treats-me-like-his-son-osinbajo-says/
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 12, 2017, 08:40:32 AM
Your site isn't loading mostly for me I get a whitebackground and I did see this n the error log in firebug

ReferenceError: sp_image_resize is not defined[Learn More]  buhari-treats-me-like-his-son-osinbajo-says:217:3
ReferenceError: smc_Toggle is not defined[Learn More]  buhari-treats-me-like-his-son-osinbajo-says:327:8
jquery is already loaded with version: 2.1.1  buhari-treats-me-like-his-son-osinbajo-says:986:5
result of version check: 1  buhari-treats-me-like-his-son-osinbajo-says:988:6
ReferenceError: QuickReply is not defined[Learn More]  buhari-treats-me-like-his-son-osinbajo-says:851:10
TypeError: urlMatched is null[Learn More]
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on May 12, 2017, 10:19:46 AM
Quote from: vbgamer45 on May 12, 2017, 08:40:32 AM
Your site isn't loading mostly for me I get a whitebackground and I did see this n the error log in firebug

ReferenceError: sp_image_resize is not defined[Learn More]  buhari-treats-me-like-his-son-osinbajo-says:217:3
ReferenceError: smc_Toggle is not defined[Learn More]  buhari-treats-me-like-his-son-osinbajo-says:327:8
jquery is already loaded with version: 2.1.1  buhari-treats-me-like-his-son-osinbajo-says:986:5
result of version check: 1  buhari-treats-me-like-his-son-osinbajo-says:988:6
ReferenceError: QuickReply is not defined[Learn More]  buhari-treats-me-like-his-son-osinbajo-says:851:10
TypeError: urlMatched is null[Learn More]

but its loading on my firefox browser here
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on May 12, 2017, 10:52:53 AM
as it open ???
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 12, 2017, 11:09:25 AM
I see javascript errors like this. That would prevent it from working. From other mods or sites code

Error: Invalid argument  sdk.js:62:151
jquery is already loaded with version: 2.1.1  buhari-treats-me-like-his-son-osinbajo-says:986:5
result of version check: 1  buhari-treats-me-like-his-son-osinbajo-says:988:6
TypeError: urlMatched is null[Learn More]
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on May 12, 2017, 11:43:40 AM
Quote from: vbgamer45 on May 12, 2017, 11:09:25 AM
I see javascript errors like this. That would prevent it from working. From other mods or sites code

Error: Invalid argument  sdk.js:62:151
jquery is already loaded with version: 2.1.1  buhari-treats-me-like-his-son-osinbajo-says:986:5
result of version check: 1  buhari-treats-me-like-his-son-osinbajo-says:988:6
TypeError: urlMatched is null[Learn More]

i dont know where the error comes from, immediately i install facebook embed mod i discover that the facebook mod didnt work for me, same also as the instagram mod too, so i unistalled them, that is what i think may cause the tweet mod stop working , because it works before. i really want to fix the tweet mod error please.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 12, 2017, 12:04:06 PM
Yeah I would ask someone for help. The error is not from this mod but from another script you have.
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on May 12, 2017, 12:18:28 PM
Quote from: vbgamer45 on May 12, 2017, 12:04:06 PM
Yeah I would ask someone for help. The error is not from this mod but from another script you have.

ok will be expecting you
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 12, 2017, 12:34:54 PM
Sorry i don't have time I would ask on the help wanted forum.
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 13, 2017, 09:43:52 AM
Quote from: Xpresskonami on May 12, 2017, 08:37:05 AM
Quote from: vbgamer45 on May 12, 2017, 08:29:57 AM
Link to forum that has the twitter post

This is the link

http://spyloadedtv.com/politics-news/buhari-treats-me-like-his-son-osinbajo-says/
Quote from: Xpresskonami on May 12, 2017, 12:18:28 PM
Quote from: vbgamer45 on May 12, 2017, 12:04:06 PM
Yeah I would ask someone for help. The error is not from this mod but from another script you have.

ok will be expecting you
Your forum is in a big mess and is not working properly. You need to clean the forum-software from all scripts you had installed or try with clean installation. And another advice, don't expect developers of modification's to clean up your forum.  ???
You must do it by yourself.   O:)

Title: Re: Auto Tweet Embed
Post by: Steve on May 13, 2017, 02:10:15 PM
Quote from: pocttopus on May 13, 2017, 09:43:52 AMYour forum is in a big mess and is not working properly. You need to clean the forum-software from all scripts you had installed or try with clean installation.

Not sure where you're getting this as it works just fine for me.

@ Xpresskonami - pick and choose the advice you accept wisely
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on May 13, 2017, 06:16:39 PM

Quote
Your forum is in a big mess and is not working properly. You need to clean the forum-software from all scripts you had installed or try with clean installation. And another advice, don't expect developers of modification's to clean up your forum.  ???
You must do it by yourself.   O:)

How will i clean my forum? i have notification on upgrading my database too. have been searching the forum here on how to go about it, but havent seen any.
Title: Re: Auto Tweet Embed
Post by: Steve on May 13, 2017, 07:37:47 PM
He's talking about uploading a fresh set of files: http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

However:

Quote from: Steve on May 13, 2017, 02:10:15 PM@ Xpresskonami - pick and choose the advice you accept wisely
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on May 13, 2017, 08:05:06 PM
Quote from: Steve on May 13, 2017, 07:37:47 PM
He's talking about uploading a fresh set of files: http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

However:

Quote from: Steve on May 13, 2017, 02:10:15 PM@ Xpresskonami - pick and choose the advice you accept wisely

ok thanks
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 27, 2017, 06:56:01 AM
Hello,

I don't know why but some tweet's are embedded but some are not.  :-\
Is there any explanation or advice how to solve this?  ???

Thanks!
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 27, 2017, 08:17:04 AM
I would have to see examples.
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 27, 2017, 08:23:00 AM
Here is the example:
Tweet that is not embedded properly: http://forum.mkreef.com/index.php?topic=10977.msg173534#msg173534
Tweet that is embedded: http://forum.mkreef.com/index.php?topic=10824.msg173502#msg173502

Thanks!
Title: Re: Auto Tweet Embed
Post by: pocttopus on June 03, 2017, 04:58:15 AM
Still no response?  :o
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 03, 2017, 08:09:29 AM
I am not sure what is going on with that one. It returns this html

<blockquote class="twitter-tweet"><p lang="bg" dir="ltr"><a href="https://twitter.com/hashtag/%D0%94%D0%BE%D0%B1%D1%80%D0%BE%D0%A3%D1%82%D1%80%D0%BE?src=hash">#ДоброУтро</a> <a href="https://twitter.com/hashtag/%D0%BE%D0%BD%D0%B0%D0%BA%D0%BE%D0%B3%D0%B0?src=hash">#онакога</a> имаме славеник на форум и сите заедно му посакуваме <a href="https://twitter.com/hashtag/%D0%A1%D1%80%D0%B5%D1%9C%D0%B5%D0%BD%D0%A0%D0%BE%D0%B4%D0%B5%D0%BD%D0%B4%D0%B5%D0%BD?src=hash">#СреќенРоденден</a> на <a href="https://twitter.com/velkovski_ivica">@velkovski_ivica</a> и многу многу <a href="https://twitter.com/hashtag/%D0%B0%D0%BA%D0%B2%D0%B0%D1%80%D0%B8%D1%83%D0%BC?src=hash">#аквариум</a>-и.
Title: Re: Auto Tweet Embed
Post by: pocttopus on June 03, 2017, 08:21:29 AM
I'm not sure either but this is another similar situation.
Here is another example of how some tweets are embedded and some are not. Just scroll to the bottom. :(
http://forum.mkreef.com/index.php?topic=10824.msg173577#msg173577
Title: Re: Auto Tweet Embed
Post by: pocttopus on June 09, 2017, 03:23:07 AM
No advice?  ??? :-\
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 09, 2017, 08:04:14 AM
Not at this time not sure what else to do.
Title: Re: Auto Tweet Embed
Post by: pocttopus on June 12, 2017, 01:31:15 PM
Quote from: vbgamer45 on June 09, 2017, 08:04:14 AM
Not at this time not sure what else to do.
Okay... thanks!
I'll wait for an update version.
Title: Re: Auto Tweet Embed
Post by: pocttopus on August 11, 2017, 05:58:07 AM
Still no updates about the issue why some tweets are not embedded? ??? :-[
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 11, 2017, 08:15:09 AM
None
Title: Re: Auto Tweet Embed
Post by: pocttopus on September 10, 2017, 10:25:25 AM
Why this mod is not working at all? The tweets are not embeded. :-[
http://f1legacy.com/index.php?topic=3.0
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 10, 2017, 11:14:15 AM
File permission issue page not displayed
http://f1legacy.com/tweet-cache.php?id=903567377220210688
Title: Re: Auto Tweet Embed
Post by: pocttopus on September 10, 2017, 11:38:22 AM
Thanks for your response but I don't know where to look for those file permissions.  :-[
Where is it?  ???

*edit - The permission on tweet-cache file is 666.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 10, 2017, 11:48:14 AM
Try 777 or check file owner.
Title: Re: Auto Tweet Embed
Post by: pocttopus on September 10, 2017, 11:56:41 AM
Can you give me tips how to find file owner?
I changed directly via filezilla on ftp to 777 but no change.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 10, 2017, 11:57:21 AM
I would contact your host or search on google.
Title: Re: Auto Tweet Embed
Post by: pocttopus on September 10, 2017, 12:02:27 PM
I tried with 755 and it worked.
I don't know why 777 does not going properly.
Thanks vbgamer45!  :)
Title: Re: Auto Tweet Embed
Post by: confuseamuse on November 07, 2017, 10:40:26 AM
How would I remove the twitter link from automatically being added below the tweet?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on November 07, 2017, 10:41:31 AM
You may have to modify the mods code if there is no setting for it.
Title: Re: Auto Tweet Embed
Post by: Rob Lightbody on April 07, 2018, 05:33:59 AM
Working well "out of the box" on 2.0.15.  Thanks.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on April 07, 2018, 09:25:56 AM
Glad you enjoy it.
Title: Re: Auto Tweet Embed
Post by: pocttopus on April 08, 2018, 03:47:36 PM
I still dont have a clue why tweets are not displayed!?  :o :-[
https://f1legacy.com/races-21/bahrain-gp-sunday-summary-vettel-2nd-win-of-the-season/msg198/#msg198
Title: Re: Auto Tweet Embed
Post by: Rich N-O on April 11, 2018, 07:40:18 AM
Got a couple of change requests if possible.

1. Auto-embed mobile.twitter.com links.
2. Auto-hide query strings.

TIA
Title: Re: Auto Tweet Embed
Post by: UFT on May 15, 2018, 05:30:23 PM
He VB.  I can't get this mod to work.  I am using this theme --> Startaza (https://www.simplemachines.org/community/index.php?topic=557598.0)

Any idea why it wouldn't work?

Thanks for the help!!
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 15, 2018, 08:05:06 PM
Doesn't install or does not work?
Title: Re: Auto Tweet Embed
Post by: UFT on May 15, 2018, 08:37:42 PM
It installs correctly but it just doesn't do anything
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 15, 2018, 08:43:28 PM
Link to a post with twitter link that it is not doing anything.
Title: Re: Auto Tweet Embed
Post by: UFT on May 15, 2018, 09:14:05 PM
Here you go VB:  https://ultrafusedthemes.com/smf/index.php?topic=4.0
Title: Re: Auto Tweet Embed
Post by: UFT on May 15, 2018, 09:20:28 PM
Could it be because my test environment is https?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 15, 2018, 10:17:04 PM
You have a file permission error on
https://ultrafusedthemes.com/smf/tweet-cache.php?id=996227930161401857

Check file permissions for that file
Title: Re: Auto Tweet Embed
Post by: UFT on May 15, 2018, 10:24:43 PM
Quote from: vbgamer45 on May 15, 2018, 10:17:04 PM
You have a file permission error on
https://ultrafusedthemes.com/smf/tweet-cache.php?id=996227930161401857

Check file permissions for that file

I tried 755 and 777 and it still didn't work
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 15, 2018, 10:43:38 PM
If not check your apache server error log with hostgator
Title: Re: Auto Tweet Embed
Post by: UFT on May 16, 2018, 08:32:51 AM
Quote from: vbgamer45 on May 15, 2018, 10:43:38 PM
If not check your apache server error log with hostgator

Not really sure where to check that.  Any advice?
Title: Re: Auto Tweet Embed
Post by: UFT on May 16, 2018, 08:44:02 AM
I found it - attached.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 16, 2018, 08:58:16 AM
None of those errors seems to be related to that file.

Try permissions of 644 on the file.
Title: Re: Auto Tweet Embed
Post by: UFT on May 16, 2018, 12:19:14 PM
Unfortunately it didn't help.
Title: Re: Auto Tweet Embed
Post by: UFT on May 16, 2018, 12:25:57 PM
I set the tweet-cache.php to 644 and the whole folder is 755
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 16, 2018, 12:33:57 PM
Out of ideas. I have only see that happen due to file ownership issues.
Title: Re: Auto Tweet Embed
Post by: UFT on May 16, 2018, 12:37:50 PM
Quote from: vbgamer45 on May 16, 2018, 12:33:57 PM
Out of ideas. I have only see that happen due to file ownership issues.

Thanks anyway.  Sorry we can't use it.
Title: Re: Auto Tweet Embed
Post by: UFT on May 16, 2018, 12:53:38 PM
The attached error log is from the current live site that is using this mod.  Any ideas?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 16, 2018, 01:52:00 PM
Thanks that may help
Title: Re: Auto Tweet Embed
Post by: UFT on May 16, 2018, 05:07:38 PM
So I deleted everything on my test site - DB and all.  I did a new/clean install.  The only package I have is Auto Tweet Embed and Responsive Curve.  The tweet-cache.php file permission set to 644.  Tested on SMF Default Theme - Curve, Core Theme, and Startaza themes.  No errors in SMF or server error_log - it still doesn't work.

No other ideas?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 17, 2018, 09:31:48 AM
Try some other twitter urls I want to see if it is just that one or all of them.
Title: Re: Auto Tweet Embed
Post by: UFT on May 17, 2018, 12:41:58 PM
https://ultrafusedthemes.com/index.php?topic=3.0
Title: Re: Auto Tweet Embed
Post by: luuuciano on May 17, 2018, 02:56:32 PM
We have used this in the past http://custom.simplemachines.org/mods/index.php?mod=3837
Suki released a new one too?
Title: Re: Auto Tweet Embed
Post by: UFT on May 17, 2018, 07:30:05 PM
Thanks but I'm probably going to go with NIBOGO's Auto Media Embedder. 
Title: Re: Auto Tweet Embed
Post by: UFT on May 18, 2018, 11:37:16 PM
Quote from: UFT on May 17, 2018, 07:30:05 PM
Thanks but I'm probably going to go with NIBOGO's Auto Media Embedder.

I got NIBOGO's Media Embedder - it works perfectly!
Title: Re: Auto Tweet Embed
Post by: Rob Lightbody on December 04, 2018, 01:54:27 PM
Hello!

This has been working fine for me for months, but now is erroring as follows :-

id=1063476798875418626
Database Error: Incorrect string value: '\xF0\x9F\x9A\xA2\xF0\x9F...' for column 'html' at row 1
File: /home/theqesto/public_html/forum/tweet-cache.php
Line: 94

Any ideas?

Thanks,

- Rob
Title: Re: Auto Tweet Embed
Post by: Arantor on December 04, 2018, 03:08:20 PM
Emojis don't seem to be supported.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on February 13, 2019, 10:01:19 PM
+Added install support for SMF 2.1 RC1
Title: Re: Auto Tweet Embed
Post by: natcip on February 21, 2019, 12:48:59 PM
This is a lovely mod. Thank you! :)

Some users on my forum noted that tweets with parameters at the end of the URL can't be processed and it just shows the link.

For example
https://twitter.com/skyferreira/status/1098510248443142144?s=21
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on February 21, 2019, 01:17:56 PM
Will check it out.
Title: Re: Auto Tweet Embed
Post by: natcip on May 10, 2019, 01:06:57 PM
Quote from: vbgamer45 on February 21, 2019, 01:17:56 PM
Will check it out.
Thank you! Has this been fixed in the last version? :)
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 10, 2019, 01:45:23 PM
haven't had time to look
Title: Re: Auto Tweet Embed
Post by: ozbob on July 29, 2019, 08:23:18 PM
Heads up.  Auto Twitter Embed 1.0.1 to embed tweets in posts on my forum.  Suddenly stated to have ' long running script ' issues, threads would hang etc.  Uninstalled mod and problem went away.  I suspect something has changed at twitter end to cause the issue.

Bob
Title: Re: Auto Tweet Embed
Post by: MPHV on August 23, 2019, 03:36:12 PM
I'm also having problems with the MOD on my site.

Tweets are no longer shown, it only shows a frame with the text:
Tweet error (does not exist)

If you click the link of the tweet, the tweet ofcourse does exist....

For example:
https://www.hulpverleningsforum.nl/index.php/topic,106215.msg1504797.html#msg1504797

Any suggestions?


Title: Re: Auto Tweet Embed
Post by: MPHV on August 25, 2019, 05:35:49 AM
I've been debugging a bit myself,

seems it goes wrong in fetching the json from the API,
this returns an error: TCP connection reset by peer

The URL is valid, when i enter it in the browser, i get the json file back.
Title: Re: Auto Tweet Embed
Post by: MPHV on August 25, 2019, 07:57:06 AM
Well i guess i found it....

I ran a test using this code:
Quote<?php
$tweet = 1163869660086861825;
$twitterapi_url = "https://api.twitter.com/1/statuses/oembed.json?id=";
$twitterapi_url = $twitterapi_url . $tweet;

if (function_exists('curl_init')) {
    $curl = curl_init($twitterapi_url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl,CURLOPT_SSL_VERIFYPEER, FALSE);
    $response = curl_exec($curl);
    var_dump($response);
    curl_close($curl);
}
   ?>

Running it on our production server results in bool(false).
Any other server running the same code results in correct output

Ergo: Did twitter block our server?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 25, 2019, 12:34:50 PM
Try this version and see if it helps
Title: Re: Auto Tweet Embed
Post by: MPHV on August 25, 2019, 03:01:41 PM
Thanks, however unfortunately it gives the same results, would it be a possibility twitter blacklisted my server from the API? 
A test i performed from another server (with the old code) was sucessfull.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 25, 2019, 03:03:19 PM
Yes it could be then do have limits.
I tested your twitter link on my test forum and it worked ok.

Try a different twitter link the old one might be cached though.
Title: Re: Auto Tweet Embed
Post by: MPHV on September 01, 2019, 01:47:35 PM
Hi,

Update from my side.
I have rebuild the plugin, using this PHP wrapper for twitter: https://github.com/J7mbo/twitter-api-php
and the API function: https://publish.twitter.com/oembed.json

I did have to register as a developer with Twitter in order to get API keys, which are required.

Let me know if your interested in my code, happy to share.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 01, 2019, 02:03:01 PM
Sure I would like to see it.
Title: Re: Auto Tweet Embed
Post by: imtml on October 06, 2019, 06:00:13 AM
Hello everyone.

I have this mod with 1.1.1 and SMF with the latest 2.0.15 but when I post a link, it seems as "Invalid Tweet ID" no matter what tweet I post. It was working fine since last month. And the funny thing, when I remove the package, I still see the same error.

How can fix it?
Title: Re: Auto Tweet Embed
Post by: imtml on October 07, 2019, 06:17:19 AM
Quote from: imtml on October 06, 2019, 06:00:13 AM
Hello everyone.

I have this mod with 1.1.1 and SMF with the latest 2.0.15 but when I post a link, it seems as "Invalid Tweet ID" no matter what tweet I post. It was working fine since last month. And the funny thing, when I remove the package, I still see the same error.

How can fix it?


I really need help on this. Does anybody know anything?
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 01:16:04 PM
Quote from: imtml on October 06, 2019, 06:00:13 AM
Hello everyone.

I have this mod with 1.1.1 and SMF with the latest 2.0.15 but when I post a link, it seems as "Invalid Tweet ID" no matter what tweet I post. It was working fine since last month. And the funny thing, when I remove the package, I still see the same error.

How can fix it?


Please. Please.

It's the same problem for at least 2 months.I uninstalled the mod, nothing changes. I'm going to go crazy.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 01:26:54 PM
Upload the package to https://www.smfhacks.com/smf-package-parser.html

Then check that all the edits have been reversed.
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 01:49:05 PM
Quote from: vbgamer45 on October 30, 2019, 01:26:54 PM
Upload the package to https://www.smfhacks.com/smf-package-parser.html

Then check that all the edits have been reversed.

I did. And then what? There's no useful info I got there.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 01:49:50 PM
It tells you what files were edited by the modification. Just make sure all the modification code is removed.
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 02:03:07 PM
Quote from: vbgamer45 on October 30, 2019, 01:49:50 PM
It tells you what files were edited by the modification. Just make sure all the modification code is removed.

I can't really understand it. Can you please tell me what to do?

(https://ibb.co/Tq4Szxm)
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 02:13:05 PM
See the edit it makes load.php and make sure that edit does not exist.
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 02:40:20 PM
Quote from: vbgamer45 on October 30, 2019, 02:13:05 PM
See the edit it makes load.php and make sure that edit does not exist.
*
Forgive me but I don't think I understood. Can u please be clearer
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 02:46:49 PM
Edit Sources/Loads.php and remove the code added by this mod.
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 02:56:15 PM
Quote from: vbgamer45 on October 30, 2019, 02:46:49 PM
Edit Sources/Loads.php and remove the code added by this mod.

I'm really not good at this. Which line/codes do I have to remove?
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 03:01:32 PM
Can you please edit it and send me back? I know I want so much. But, please.

https://files.fm/f/vkygkdsp
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 03:03:39 PM
yes, please attach to this post
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 03:35:20 PM
Quote from: vbgamer45 on October 30, 2019, 03:03:39 PM
yes, please attach to this post

Here you go. Thank you.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 03:55:59 PM
Updated file attached
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 04:00:01 PM
Quote from: vbgamer45 on October 30, 2019, 03:55:59 PM
Updated file attached


Thank you but it's still same. When I post a Twitter link, it seems as "Invalid Tweet ID."

http://www.lakerstr.com/forum/index.php?topic=54.msg255#msg255
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 04:02:55 PM
Try new posts with twitter link.
Might be an issue with old posts.
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 04:07:23 PM
Quote from: vbgamer45 on October 30, 2019, 04:02:55 PM
Try new posts with twitter link.
Might be an issue with old posts.

Nope. It's still same.

Funny fact, even though I uninstall/remove the package, I still get the same error. I can't see the normal Twitter link even if I don't want to use this mod.

This is frustrating.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 04:09:30 PM
It might not be this mod in this case....
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 04:13:31 PM
Quote from: vbgamer45 on October 30, 2019, 04:09:30 PM
It might not be this mod in this case....

I downloaded and uploaded from here. https://custom.simplemachines.org/mods/index.php?mod=3991

It's this mod.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 04:17:51 PM
That edit in load.php is the only one the mod makes....if it happens on new posts then it is not the fault of the mod.
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 04:23:20 PM
Quote from: vbgamer45 on October 30, 2019, 04:17:51 PM
That edit in load.php is the only one the mod makes....if it happens on new posts then it is not the fault of the mod.

I see but, do you have any idea how can I fix this whole mess? I can't even use it without the mod.
Title: Re: Auto Tweet Embed
Post by: imtml on October 30, 2019, 04:32:02 PM
This mod broke something on the forum and whatever I do now, it doesn't ever work.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on October 30, 2019, 04:43:32 PM
Not sure, at this point either. If mod is removed it shouldn't cause any new issues.
Title: Re: Auto Tweet Embed
Post by: imtml on October 31, 2019, 06:28:21 AM
Quote from: vbgamer45 on October 30, 2019, 04:43:32 PM
Not sure, at this point either. If mod is removed it shouldn't cause any new issues.

https://www.simplemachines.org/community/index.php?topic=570349.msg4036250#msg4036250
Title: Re: Auto Tweet Embed
Post by: imtml on November 01, 2019, 07:34:15 AM
Hello vbgamer45,

Now I have a different problem. I upgraded my SMF to a virgin state. I don't get "Invalid Tweed ID" error anymore.

But now, it seems like this. Every Tweet seems like this.

Tweet error (does not exist)

Title: Re: Auto Tweet Embed
Post by: imtml on November 01, 2019, 12:43:37 PM
Ladies and gentleman,

This mod either breaks your forum or doesn't work properly. And the author claims that "he has nothing to do".

Sincerely.

Have a wonderful weekend.
Title: Re: Auto Tweet Embed
Post by: Arantor on November 01, 2019, 12:45:25 PM
Except that it works for other users and when you uninstalled it, you had other bugs relating to Twitter that do not happen in an unmodified SMF so very likely it isn't actually this mod.
Title: Re: Auto Tweet Embed
Post by: imtml on November 01, 2019, 12:49:19 PM
Quote from: Arantor on November 01, 2019, 12:45:25 PM
Except that it works for other users and when you uninstalled it, you had other bugs relating to Twitter that do not happen in an unmodified SMF so very likely it isn't actually this mod.
Yes, maybe. So I posted my latest problem and if no one has nothing to do with that, there's something wrong with something, right? And I'm not the expert to be able to solve it.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on November 01, 2019, 01:29:14 PM
Sources/Load.php was the only edit it makes and there are no hooks. I gave you the edited file with that code removed. If you have a new set of files from SMF then there is no way the mod could be installed unless you installed the mod again...
Title: Re: Auto Tweet Embed
Post by: imtml on November 01, 2019, 03:29:32 PM
Quote from: vbgamer45 on November 01, 2019, 01:29:14 PM
Sources/Load.php was the only edit it makes and there are no hooks. I gave you the edited file with that code removed. If you have a new set of files from SMF then there is no way the mod could be installed unless you installed the mod again...
Aight thanks.
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on December 15, 2019, 10:21:52 PM
Quote from: Xpresskonami on May 12, 2017, 07:49:20 AM
This mod stop embedding. please how can I fix the error.

I raise comment on this mod previous year about this mod stop working on my forum. i have do lot of changes on my forum. and the mod is not working on my forum yet, please check out the tweet link page in my forum https://bit.ly/2S1WoAp
Title: Re: Auto Tweet Embed
Post by: Xpresskonami on December 16, 2019, 03:07:54 PM
I just hope anyone could assist me on this
Title: Re: Auto Tweet Embed
Post by: Rob Lightbody on December 22, 2019, 07:02:11 AM
I still use this mod, with SMF 2.0.15, and it works fine.

The only thing that catches it out, is anything after the ? in the tweet.  If I copy a tweet , it adds ?s=19 to the end - and this "breaks" the mod.  I know to remove it, but my users don't.

Thanks.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on December 22, 2019, 08:53:08 AM
Hmm, I would need to add support for the mod for the ?s= query string.
Title: Re: Auto Tweet Embed
Post by: Hamm9 on January 21, 2020, 09:25:27 PM
I have installed Auto Tweet Embed v1.1 in a SMF 2.1 Beta 3 forum, with default theme activated. Tweets are embed flawlessly, but I cannot quote messages through quick reply or use the WYSIWWYG editor with the package installed. If I uninstall it, then everything works OK again. Anyone with this problem too?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on January 21, 2020, 09:36:44 PM
Quoting the emebed tweets?
Title: Re: Auto Tweet Embed
Post by: Hamm9 on January 22, 2020, 04:31:19 AM
Quote from: vbgamer45 on January 21, 2020, 09:36:44 PM
Quoting the emebed tweets?

Quoting any message is impossible. I get a Loading message on the top that never goes away. The editor doesn't work either—no smileys, no font options.

I modified autotwitter.xml. First, I change the jQuery version from 2.1.1 to 3.1.1. But still the same. Deleting all the modification for the Load.php file solves the problem.
Title: Re: Auto Tweet Embed
Post by: Hamm9 on January 22, 2020, 04:38:32 AM
This is what I get on Web Console when I visit any thread from the forum with the package installed.


TypeError: $.sceditor is undefined topic,424.30.html:1010:5
    <anonymous> topic,424.30.html:1010
    jQuery 4
        j
        fireWith
        ready
        I
jQuery.Deferred exception: $(...).superfish is not a function @/foro/Themes/default/scripts/minified.js?beta21:460:390
j@https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:29948
g/</k<@https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:30262
undefined jquery.min.js:2:31525
TypeError: $(...).superfish is not a function minified.js:460:390
    <anonymous> /foro/Themes/default/scripts/minified.js?beta21:460
    jQuery 2
        j
        k
TypeError: oIframe is undefined 2 drafts.js:25:23
    init /foro/Themes/default/scripts/drafts.js?beta21:25
    <anonymous> /foro/Themes/default/scripts/drafts.js?beta21:15


When I click on Quote button, I get this:

TypeError: $(...).data(...) is undefined topic,424.30.html:1101:26
    onDocReceived topic,424.30.html:1101
    success minified.js:74
    jQuery 4
        j
        fireWith
        x
        b


None of these errors appear with the package uninstalled.
Title: Re: Auto Tweet Embed
Post by: wylekk on February 22, 2020, 04:29:45 AM
Try connecting like this

<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/jquery-3.2.1.min.js"></script>

or so
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
Title: Re: Auto Tweet Embed
Post by: spiros on March 31, 2020, 06:32:31 PM
I already have a version of jquery.min.js loading on my theme (v3.4.1, here (https://www.translatum.gr/forum/Themes/CustomSunRise/scripts/jquery.min.js)). Is it possible to remove/adapt the extra jquery call in this line in Load.php? I tried so, but the embed did not work then.

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

Post with embed here:  https://www.translatum.gr/forum/index.php?topic=977462.0
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on April 26, 2020, 10:06:55 AM
Please fix I can't see the issue your bbc code is messed up.
Title: Re: Auto Tweet Embed
Post by: chinaren on April 26, 2020, 10:28:34 AM
Quote from: vbgamer45 on April 26, 2020, 10:06:55 AM
Please fix I can't see the issue your bbc code is messed up.


So sorry!  I was trying to fix the post but my internet started playing up, and it was driving me mad, so, total redo.


When I try to install this mod in the usual fashion, it says that is corrupted or not compatible with this version of SMF, as per the message below.


Now, my version of SMF is 2.1 RC2 which, according to the mod, is compatible.  So any ideas what i'm doing wrong?  'cos it's bound to be me.


Thank you!  :)


The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on April 26, 2020, 07:29:51 PM
Fixed should install for 2.1 RC2
Title: Re: Auto Tweet Embed
Post by: chinaren on April 27, 2020, 02:11:28 AM
Thank you!  You are a hero VBG!  :D
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on April 27, 2020, 09:02:07 AM
Glad to help
Title: Re: Auto Tweet Embed
Post by: Rob Lightbody on May 08, 2020, 07:00:54 AM
Big fan of this Mod, but it seems to have stopped working recently?

Here's a post I made that includes some tweets - https://www.theqe2story.com/forum/index.php?topic=9313.msg108341#msg108341

In my error log, I can see errors such as this
Database Error: Incorrect string value: '\xF0\x9F\x87\xAC\xF0\x9F...' for column `theqesto_smf1`.`smf_tweet_cache`.`html` at row 1Apply Filter: Only show the errors from this fileFile: /home/theqesto/public_html/forum/tweet-cache.php

Thanks for any advice.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 08, 2020, 09:37:22 AM
Change the the character encoding of  the database table smf_tweet_cache to utf8 to solve I believe.
Title: Re: Auto Tweet Embed
Post by: Arantor on May 08, 2020, 10:02:53 AM
Think you need utf8mb4, and the queries to be on a connection that used SET NAMES utf8mb4; to make that work.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 08, 2020, 10:07:59 AM
Thanks for the tip!
Title: Re: Auto Tweet Embed
Post by: Rob Lightbody on May 08, 2020, 11:07:45 AM
Quote from: vbgamer45 on May 08, 2020, 09:37:22 AM
Change the the character encoding of  the database table smf_tweet_cache to utf8 to solve I believe.

Hi,

Thanks for replying.  I remember that I did have that problem once before, but its on UTF8 general now so don't know why i'm getting the error this time
Title: Re: Auto Tweet Embed
Post by: Arantor on May 08, 2020, 11:08:24 AM
Because UTF8 general only has a subset of real UTF-8, which emojis don't fit into. Hence the suggestion for utf8mb4.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 11, 2020, 06:45:10 PM
Update
2.0
+Added support to Emoji's thanks to Arantor for changes needed
Title: Re: Auto Tweet Embed
Post by: Rob Lightbody on May 13, 2020, 11:02:43 AM
Many thanks for the update.

I uninstalled 1.1 (including the data) and then reinstalled your new v2.0.

It is now no longer erroring, which is lovely, however I'm also not getting the thumbnail preview of the tweet either...

See - https://www.theqe2story.com/forum/index.php?topic=8675.0 and https://www.theqe2story.com/forum/index.php?topic=9164.0 for two random examples from my forum.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 13, 2020, 11:05:25 AM
Seems to load for me ok
Title: Re: Auto Tweet Embed
Post by: Rob Lightbody on May 13, 2020, 11:28:45 AM
Quote from: vbgamer45 on May 13, 2020, 11:05:25 AM
Seems to load for me ok

Me too now!  How strange!   Thats awesome though, thanks very much for your work on this package, its hugely appreciated.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 13, 2020, 11:57:57 AM
Glad to help. Probably was a cache issue. Had to wait for it to timeout.
Title: Re: Auto Tweet Embed
Post by: laboo9 on May 28, 2020, 07:11:06 PM
I installed the auto tweet embed a couple days ago.  Everything was working until this morning when the tweets stopped embedding as they look on twitter.  Now they have the text of the tweet along with hashtags, links to video, and link to pics with the actual link to the actual tweet underneath. 

I'm using 2.0.17.  I have tried uninstalling and reinstalling without any issues but the tweets still don't embed correctly.  Any ideas?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 28, 2020, 07:16:16 PM
Check your forums error log.
And your tweet-cache.php file permissions.
Title: Re: Auto Tweet Embed
Post by: laboo9 on May 28, 2020, 08:17:06 PM
the only error I'm getting is File:....../forums/Themes/default/languages/OharaYTEmbed.english.php (main sub template - eval?)

tweet-cache.php file permissions is 0666
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 28, 2020, 08:23:42 PM
Do you have a link to the post?
Title: Re: Auto Tweet Embed
Post by: laboo9 on May 28, 2020, 08:35:02 PM
It's a private board.

http://www.hard2bhumble.net/forums/index.php?topic=13791.msg227105#msg227105
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 28, 2020, 08:51:13 PM
Ah, that will be hard for me to check. Basically I would look in the console log to see if there are any javascript errors and also checking the response from tweet-cache in the network log.
Title: Re: Auto Tweet Embed
Post by: laboo9 on May 28, 2020, 09:57:54 PM
I'm pretty new to this stuff but is this what you are looking for?

<?php
/*
Rough take on Twitter oEmbed for VeloRooms
by L'arri : [email protected]
27 October 2014

Packaged and modified by SMFHacks.com -vbgamer45
*/

// I used SMF items where possible for database interactions and required includes.
global $ssi_guest_access;
$ssi_guest_access = 1;
require(dirname(__FILE__) . '/SSI.php');

global $smcFunc;

$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_NUMBER_INT);
$qv  = $_GET['id'];
if (!empty($qv))
{
   check_cache($qv);
}
else
{
   echo '{"html":"<p style=\"color: #666; border: 1px dotted #666; padding: 5px; width: 490px;\">' . $txt['autotwitter_blankid'] . '</p>"}';
}

function check_cache($tweet)
{
   global  $smcFunc;
   
   if (!is_numeric($tweet))
      return;
   
   $request = $smcFunc['db_query']('','SELECT
      html from
   {db_prefix}tweet_cache
   where tweetid = {raw:tweet}',
   array(
      'tweet' => $tweet
      )
   );
   
   if ($smcFunc['db_num_rows']($request) == 0)
   {
      add_cache($tweet);
   }
   else
   {
      while ($row = $smcFunc['db_fetch_row']($request))
         echo '{"html" : "' . $row[0] .'"}';
   }      
   $smcFunc['db_free_result']($request);
   
}

function add_cache($tweet)
{
   global $smcFunc, $txt, $sourcedir;

   $twitterapi_url = "https://api.twitter.com/1.1/statuses/oembed.json?id=";
   $twitterapi_url = $twitterapi_url . $tweet;
   
   if (function_exists('curl_init'))
    {
        $curl = curl_init($twitterapi_url);
       curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
       curl_setopt($curl,CURLOPT_SSL_VERIFYPEER, FALSE);
       $response = curl_exec($curl);
       curl_close($curl);
    }
    else
    {
        require_once($sourcedir . '/Subs-Package.php');
        $response = fetch_web_data($twitterapi_url);
    }
   
   
   $json_content = json_decode($response, true);
   $json_content = preg_replace( "/\r|\n/", "", $json_content );
   
   $html = $json_content['html'];
   if (!empty($html))
   {

      $smcFunc['db_query']('', '
         SET NAMES {string:db_character_set}',
         array(
            'db_character_set' => 'utf8mb4',
         )
      );

      $request = $smcFunc['db_insert']('',
            '{db_prefix}tweet_cache',
            array(
               'tweetid' => 'raw', 'html' => 'text'
            ),
            array(
               $tweet, addslashes($html)
          ),
            array('tweetid','html')
         );
      echo '{"html" : "' . addslashes($html) .'"}';
   }
   else
   {
      echo '{"html":"<p style=\"color: #666; border: 1px dotted #666; padding: 5px; width: 490px;\">' . $txt['autotwitter_tweeterror'] . '</p>"}';
   }
   
}

?>
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 28, 2020, 10:57:08 PM
No looking for javascript errors...
Title: Re: Auto Tweet Embed
Post by: pocttopus on May 29, 2020, 02:59:34 AM
Disable the Enhanced Tracking protection to your site from your browser.

Title: Re: Auto Tweet Embed
Post by: kilk on June 09, 2020, 04:07:27 PM
I havent had any issues with this mod, just solid af, thank you again vbgamer
Title: Re: Auto Tweet Embed
Post by: natcip on August 02, 2020, 10:38:44 AM
For whatever reason some tweets won't embed at all, like in this post (http://www.brandysource.net/index.php?topic=49516.msg2594219#msg2594219), even though the link structure is identical to other posts where it did embed. :-\
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 02, 2020, 10:57:21 AM
Looks like i get a database error are you using latest version?
http://www.brandysource.net/tweet-cache.php?id=1289643269563904002
If so post the db error from your logs
Title: Re: Auto Tweet Embed
Post by: natcip on August 02, 2020, 01:36:02 PM
Yes, I've just updated it in May.
And there are no error log entries.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 02, 2020, 02:08:03 PM
What happens when you click that link above as admin?
I want to see the message returned.
Title: Re: Auto Tweet Embed
Post by: natcip on August 03, 2020, 06:21:07 AM
Incorrect string value: '\xF0\x9F\x92\x80 <...' for column `brandyso_sql1`.`brandy4f_sql1_smf_tweet_cache`.`html` at row 1
File: /home/www/brandyso/tweet-cache.php
Line: 93
Title: Re: Auto Tweet Embed
Post by: Arantor on August 03, 2020, 06:22:59 AM
Can't store emoji... if the mod pushed it through $smcFunc['htmlspecialchars'] this would be fine.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 03, 2020, 06:55:29 AM
Would that break the html response? Thinking I could do that but then do  un_htmlspecialchars to get right content?


$html = $json_content['html'];
if (!empty($html))
{

$smcFunc['db_query']('', '
SET NAMES {string:db_character_set}',
array(
'db_character_set' => 'utf8mb4',
)
);

$request = $smcFunc['db_insert']('',
'{db_prefix}tweet_cache',
array(
'tweetid' => 'raw', 'html' => 'text'
),
array(
$tweet, addslashes($html)
),
array('tweetid','html')
);
echo '{"html" : "' . addslashes($html) .'"}';
}
Title: Re: Auto Tweet Embed
Post by: Arantor on August 03, 2020, 07:00:43 AM
You only need to htmlspecialchars it before sending to the database (because even though you have a SET NAMES call, none of that matters if the underlying table isn't also utf8mb4 - which by evidence of the above, it is not) and I *think* you can safely un_htmlspecialchars on the way back.

Alternatively, borrow the routine from $smcFunc that fixes UTF-8 (it entity encodes all emoji as numeric-form entities) and just html_entity_decode on the way back?

Though entities are valid HTML so...
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 03, 2020, 07:07:26 AM
I had it setup on the field level on the install

ALTER TABLE {db_prefix}tweet_cache CHANGE html html text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci



Quote from: natcip on August 03, 2020, 06:21:07 AM
Incorrect string value: '\xF0\x9F\x92\x80 <...' for column `brandyso_sql1`.`brandy4f_sql1_smf_tweet_cache`.`html` at row 1
File: /home/www/brandyso/tweet-cache.php
Line: 93

Try the attached file and see if it helps
Copy to root of your SMF install and make sure right permissions are set.

Title: Re: Auto Tweet Embed
Post by: Arantor on August 03, 2020, 07:15:31 AM
@vbgamer45: if someone ever does a UTF-8 conversion in SMF, it'll force convert it to non-mb4, in spite of what the database says. Things are better in 2.1.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 03, 2020, 07:31:39 AM
Bah, didn't know that.
Title: Re: Auto Tweet Embed
Post by: natcip on August 04, 2020, 06:17:04 AM
Quote from: vbgamer45 on August 03, 2020, 07:07:26 AM
I had it setup on the field level on the install

ALTER TABLE {db_prefix}tweet_cache CHANGE html html text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci



Quote from: natcip on August 03, 2020, 06:21:07 AM
Incorrect string value: '\xF0\x9F\x92\x80 <...' for column `brandyso_sql1`.`brandy4f_sql1_smf_tweet_cache`.`html` at row 1
File: /home/www/brandyso/tweet-cache.php
Line: 93

Try the attached file and see if it helps
Copy to root of your SMF install and make sure right permissions are set.
Thank you for this. Unfortunately no change. :( File is set to 644.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 04, 2020, 09:26:05 AM
Can you rerun this query on your database

ALTER TABLE smf_tweet_cache CHANGE html html text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
Title: Re: Auto Tweet Embed
Post by: natcip on August 05, 2020, 06:08:20 AM
Just did it
tweet-cache.php now shows this
{"html":"

Tweet error (blank ID)
"}

But the tweets still don't embed
Title: Re: Auto Tweet Embed
Post by: chrishicks on August 12, 2020, 07:25:54 PM
Is there a way to have the embeds use a dark theme instead of the white? Like this:

https://i.imgur.com/DnigklQ.png

It's not a huge deal I was just curious since my theme is entirely dark colored.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 12, 2020, 07:39:36 PM
Maybe might have to tweak the embed code.
Title: Re: Auto Tweet Embed
Post by: natcip on May 29, 2021, 04:15:13 PM
Hi there,
I just tried posting a tweet link and instead of showing an embedded tweet, the post literally looks like this:
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">I digress .</p>&mdash; SZA (@sza) <a href="https://twitter.com/sza/status/1398527644115738624?ref_src=twsrc%5Etfw">May 29, 2021</a></blockquote><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>https://twitter.com/sza/status/1398527644115738624
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on May 29, 2021, 08:11:31 PM
What mods to have insalled?

that is the right code except it is showing the html instead of running it.
Title: Re: Auto Tweet Embed
Post by: natcip on May 30, 2021, 07:51:06 AM
Quote from: vbgamer45 on May 29, 2021, 08:11:31 PM
What mods to have insalled?
Simple Audio Video Embedder
Yet Another YouTube BBCode Tag
Yet Another Spoiler Mod
Soundcloud BBcode
NiceTooltips

Also, I just checked my test post from yesterday. Now it simply shows the tweet link, not the html code. ???
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on March 13, 2022, 12:46:21 AM
Update
2.1
!Updated jquery version to fix issues in SMF 2.1.x now uses save version as 2.1
Title: Re: Auto Tweet Embed
Post by: Gryzor on March 14, 2022, 07:29:53 AM
So I had installed an older version (2.0) (it had a different name? Auto Twitter Embed instead of Auto Tweet Embed?). 

I installed 2.1, thinking it'd overwrite the older one. Now I'm having embedded tweets appearing twice, and in my Package Manager I have only Auto Twitter Embed 2.0 without an uninstall option (only list files/delete)... weird? Any ideas?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on March 14, 2022, 09:16:53 AM
Uninstall then run the parser at https://www.smfhacks.com/smf-package-parser.html on the mod to find the edits to remove the old code as well.
Title: Re: Auto Tweet Embed
Post by: Gryzor on March 14, 2022, 10:02:07 AM
Yeah, thought so myself, however as I said there's no Uninstall option even if I tried emulating older versions... Really weird.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on March 14, 2022, 10:05:02 AM
Strange. Luckly there is not many edits the mod makes. Main one is the edits to load.php
Title: Re: Auto Tweet Embed
Post by: Gryzor on March 14, 2022, 10:14:16 AM
Ok then I'll take it out by hand... Cheers.

Btw, since the "unknown status" one shown in the Package Manager is 2.0, what version should I emultate to try to remove it? Instead of trying blind...
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on March 14, 2022, 10:44:56 AM
Any SMF 2.0 or 2.1 version should be ok.
Title: Re: Auto Tweet Embed
Post by: Gryzor on March 15, 2022, 06:42:08 AM
This is weird, maybe I've come across some SMF bug:

Tried emulating - still no uninstalling option. I went in through FTP and deleted the files under Packages manually, and THEN it showed as "installed" in the package manager, and I was able to uninstall.

Verified that Tweets don't get embedded.

Installed the package again, it went fine, and now I'm getting double embeds again :D Looks like I'll have to remove the code manually indeed...
Title: Re: Auto Tweet Embed
Post by: mightygiants on June 17, 2022, 11:35:39 AM
I had to collate my database to convert all tables (not sure if that is an issue).

Lately all the auto embedded tweets look like this when I post a link




When I checked the row in the database

 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 seconds.)
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 17, 2022, 12:25:50 PM
Can you copy that tweet url and post it here will test on my site.

What colation did you change it to in the database and smf version
Title: Re: Auto Tweet Embed
Post by: mightygiants on June 17, 2022, 01:32:45 PM
Quote from: vbgamer45 on June 17, 2022, 12:25:50 PMCan you copy that tweet url and post it here will test on my site.

What colation did you change it to in the database and smf version

Here is one that isn't working, but I have this issue with many of the Tweets

https://twitter.com/BobbySkinner_/status/1537803855769088000?s=20&t=EVOiClKrwR5RJFDkGVLx9g
Title: Re: Auto Tweet Embed
Post by: mightygiants on June 17, 2022, 04:23:06 PM
Here are two more

https://twitter.com/jhilliard47/status/1537890397451538436?s=21&t=0AHC3Vz6Yknjbkc-80Gjdw

https://twitter.com/nypost_schwartz/status/1537890825685741570?s=21&t=0AHC3Vz6Yknjbkc-80Gjdw
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 18, 2022, 11:34:29 AM
Do they work if you take off the data from the ? onward?
Title: Re: Auto Tweet Embed
Post by: mightygiants on June 18, 2022, 04:01:05 PM
Quote from: vbgamer45 on June 18, 2022, 11:34:29 AMDo they work if you take off the data from the ? onward?

Yes, that does seem to fix the issue
Title: Re: Auto Tweet Embed
Post by: mightygiants on June 22, 2022, 08:44:21 AM
Quote from: vbgamer45 on June 18, 2022, 11:34:29 AMDo they work if you take off the data from the ? onward?

Any chance there will be a fix for the "?" issue?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 27, 2022, 12:00:41 PM
Update!
3.0
+Added support for twitter urls with data after the ? sign thanks to live627
Title: Re: Auto Tweet Embed
Post by: mightygiants on June 27, 2022, 12:10:01 PM
Quote from: vbgamer45 on June 27, 2022, 12:00:41 PMUpdate!
3.0
+Added support for twitter urls with data after the ? sign thanks to live627


uninstall and then install the new one?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 27, 2022, 12:11:18 PM
Yes exactly
Title: Re: Auto Tweet Embed
Post by: mightygiants on June 29, 2022, 01:38:27 PM
Quote from: vbgamer45 on June 27, 2022, 12:00:41 PMUpdate!
3.0
+Added support for twitter urls with data after the ? sign thanks to live627


Not sure what the problem is, but this link failed

https://twitter.com/art_stapleton/status/1541829801463382016?s=20&t=3fzQK7KQdlejtclBN34nQg

When I removed everything after and including the "?" it worked

I checked my package manager and here is the version:

Auto Twitter Embed   3.0
Title: Re: Auto Tweet Embed
Post by: AllMassive on July 14, 2022, 01:43:11 PM
Maybe this Mod already does this, but it would be nice if the Post would be 'cached' infinitly.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on July 14, 2022, 02:29:58 PM
They are cached forever by default.
Title: Re: Auto Tweet Embed
Post by: TurtleKicker on July 22, 2022, 03:10:02 PM
Found my way to this mod when I discovered SAVE didn't handle Twitter. Not a biggie.

However, can't seem to get this to work. Don't rule out user-error, but it installs without errors and I don't get errors when loading the page. Simply nothing from Twitter is embedded... I just get the URL.

Link to example:
https://www.turtlekickers.com/index.php?topic=195.msg257#msg257

Other mods installed:

Merge Double Posts
Curve2 Color Changer
SMF 2.1.2 Update
Inter Font for SMF
SMF Trader System
FA Board Icons
ST Shop
TinyPortal
Block Proxy VPN On Registration
SMF Arcade
Quick Spoiler
Global Headers Footers
Battle
Mod Version Checker
Similar Topics
Simple Audio Video Embedder
Stop Forum Spam
FancyBox 4 SMF
Simple Referrals
Topic Rating Bar
Forum Width Setting
Email Obfuscator
Auto Twitter Embed
RSS Feed Icon
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on July 22, 2022, 03:13:26 PM
File permission issue on https://www.turtlekickers.com/tweet-cache.php
needs to be 755
Title: Re: Auto Tweet Embed
Post by: TurtleKicker on July 22, 2022, 04:11:34 PM
Quote from: vbgamer45 on July 22, 2022, 03:13:26 PMFile permission issue on https://www.turtlekickers.com/tweet-cache.php
needs to be 755

That did it! Thanks (as always... you've been consistently helpful and mind-bogglingly patient with people)
Title: Re: Auto Tweet Embed
Post by: mightygiants on July 29, 2022, 07:20:58 PM
Any update if the issue where links with a "?" will not embed?
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on August 28, 2022, 10:28:25 AM
Hello everyone!
I'm new to the forum and I've got some weird issues with this mod.
Currently I'm working on a new theme for the new SMF 2.1 update and sadly having problems with the Tweet auto embed. I uninstalled the old version and deleted the package and then installed version 3.0, the latest one if I'm not mistaken. I use Firefox (add-ons disabled) with the latest updates and also tried other browsers too.

These are the issues I'm having (even before installing version 3.0):


I went back to the SMF default theme to see whether it's an issue with my customized one but it shows the same behavior.

Here's a tweet I used that worked once and now stopped working for some reason
(edit: SMF tells me I'm not allowed to share external links)
It worked one time, got shown twice and when I edited it and hit "save", it stopped working again. Not even a new, separate reply with the same tweet got embedded.




Has anyone of you encountered similar issues as well?
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on September 06, 2022, 08:13:04 AM
Sorry I have to bump this: Does anyone have an idea why this is happening or can reproduce these issues?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 06, 2022, 09:02:23 AM
1. If you have a lot of tweets you might be rated limited from twitter.
2. Check that the mod was not installed twice if every post has two of the twitter posts inside it.
3. 4.  Haven't seen yet.
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on September 06, 2022, 10:13:41 AM
Thanks, vbGamer, for your quick response.



Edit: I uninstalled the mod an re-installed it including checkin this box "Drop table "smf_tweet_cache" and deleteing the package itself. After installation, the tweets that weren't showing before anymore were now shown again. But again, displayed twice and the moment I edit the post the Tweet won't get fetched anymore. All pretty mysterious.
Title: Re: Auto Tweet Embed
Post by: Steve on September 07, 2022, 07:20:24 AM
Quote from: vbgamer45 on September 06, 2022, 09:02:23 AMCheck that the mod was not installed twice if every post has two of the twitter posts inside it.
Quote from: Julius_2000 on September 06, 2022, 10:13:41 AMWe are currently running a public forum with SMF 2.0.19 and a test forum with the latest 2.1.2 version. On the old forum tweets work as intented, only the test forum won't work. Is there a way for non-hosts (me) to see possible duplicates of mods? In the Admin section, I can only see this mod once.
You would have to look at the file edits this mod does and make sure the changes weren't made more than once.
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on September 07, 2022, 08:51:39 AM
Quote from: Steve on September 07, 2022, 07:20:24 AM
Quote from: vbgamer45 on September 06, 2022, 09:02:23 AMCheck that the mod was not installed twice if every post has two of the twitter posts inside it.
Quote from: Julius_2000 on September 06, 2022, 10:13:41 AMWe are currently running a public forum with SMF 2.0.19 and a test forum with the latest 2.1.2 version. On the old forum tweets work as intented, only the test forum won't work. Is there a way for non-hosts (me) to see possible duplicates of mods? In the Admin section, I can only see this mod once.
You would have to look at the file edits this mod does and make sure the changes weren't made more than once.

Oh, I think you pointed to something. I just went back to the mod page and looked at the modfications it' does to php files using "parse". And it looks like there's a double entry in the load.php

Quote// Auto Embed Twitter
    global $boardurl;
   
    if (!function_exists("set_tld_regex"))
        $context['html_headers'] .=  '
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>';
   
    $context['html_headers'] .=  '
    <script type="text/javascript">
        $(document).ready(function() {

        var oTwitter = $(\'a[href*="twitter.com"][href*="/status"]\');
        if (oTwitter.length > 0) {
            oTwitter.each(function() {
                var oHolder = $(this);
                var sStr = $(this).attr(\'href\');
                sStr = sStr.replace(/\/+$/, "");
                sStr = sStr.substr(sStr.lastIndexOf(\'/\') + 1);
                $.getJSON("' . $boardurl .'/tweet-cache.php?id=" + sStr, function(data) {
                    oHolder.before(data.html);
                });
            });
        }

        });
    </script>';
    //end Auto Embed Twitter
           
   
    // Auto Embed Twitter
    global $boardurl;
   
    if (!function_exists("set_tld_regex"))
        $context['html_headers'] .=  '
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>';
   
    $context['html_headers'] .=  '
    <script type="text/javascript">
        $(document).ready(function() {

        var oTwitter = $(\'a[href*="twitter.com"][href*="/status"]\');
        if (oTwitter.length > 0) {
            oTwitter.each(function() {
                var oHolder = $(this);
                var sStr = $(this).attr(\'href\');
                sStr = sStr.replace(/\/+$/, "");
                sStr = sStr.substr(sStr.lastIndexOf(\'/\') + 1);
                $.getJSON("' . $boardurl .'/tweet-cache.php?id=" + sStr, function(data) {
                    oHolder.before(data.html);
                });
            });
        }

        });
    </script>';
    //end Auto Embed Twitter

Could I delete one of these entries without corrupting the rest?

Also, there's a double entry in the modifications.english.php
Quote// Begin Auto Embed Twitter Strings
$txt['autotwitter_tweeterror'] = 'Tweet error (does not exist)';
$txt['autotwitter_blankid'] = 'Tweet error (blank ID)';
// END Auto Embed Twitter Strings

One is at the beginning of the code, the other at the end. Can I delete the second one, too?


Edit: I think that did the trick! Tweets now embed only once.
The issue with editing posts still remains. Tweets won't get shown when I edit any post, even if I only save without editing anything at all.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 07, 2022, 10:13:01 AM
Nice, glad that solved one of the bugs!
Title: Re: Auto Tweet Embed
Post by: Steve on September 07, 2022, 11:24:58 AM
It sounds like you went ahead and deleted the duplicates but if not, the answer to both your questions is yes.  :)
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on September 07, 2022, 04:19:00 PM
Ha, Steve, yes I was bold and tried it out. I have access to the ftp server so I made a backup before modifying the phps in case it wouldn't work out.

Thank you guys, you've all been really helpful!!

Maybe we need to set up the new forum all over again to get rid of some things like that.
Title: Re: Auto Tweet Embed
Post by: Steve on September 08, 2022, 07:35:05 AM
If this is a brand new forum, that probably wouldn't be a bad idea.

https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

Do a backup and then you should be able to re-install this mod with no problems.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 08, 2022, 08:04:20 AM
I can't recreate the edit issue on my SMF 2.1.x board. I am able to edit the post either full edit or quick edit and the embeding still works.
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on September 08, 2022, 02:11:17 PM
Thank you so much guys. I think there might have gone something wrong while fiddeling with the code or whatever, given that there was also a double entry in the load.php etc.
Shouldn't be too hard to set it up fresh and then upload the theme and mods again, I hope.

Title: Re: Auto Tweet Embed
Post by: Steve on September 08, 2022, 02:33:42 PM
If you've got all the double entries removed, it should be working.
Title: Re: Auto Tweet Embed
Post by: guvenck on December 20, 2022, 04:15:45 AM
Hello,

I was using Auto Twitter Embed 1.1 with SMF 2.0.15.

I noticed that the tweets were not embedding for some time. So I updated the mod to 3.0 version.

Tweets are still not embedding,
no entries at all in smf_tweets_cache table,
and there are 503 errors in the console (for every tweet link).

Like:
Quotejquery is already loaded with version: 3.6.0
result of version check: 1
Failed to load resource: the server responded with a status of 503 (),
https://myforumsite.com/forum/tweet-cache.php?id=1603079336277458944


Title: Re: Auto Tweet Embed
Post by: Steve on December 20, 2022, 08:43:25 AM
Before anyone else asks, see my question to you here: https://www.simplemachines.org/community/index.php?msg=4141709
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on December 20, 2022, 10:36:42 AM
Check file permissions on tweet-cache.php they need to be adjusted.
Title: Re: Auto Tweet Embed
Post by: guvenck on December 21, 2022, 03:22:18 AM
Quote from: vbgamer45 on December 20, 2022, 10:36:42 AMCheck file permissions on tweet-cache.php they need to be adjusted.

Thank you vbgamer. File permissions were fine (666). It looks it was the PHP version. It was 7.1 and upon upgrading to 7.4 tweets started displaying. Now I have to deal with its side effects (Depreciated create_function errors etc.), which brings me to Steve's question, it is time for 2.1.3 :)

Btw, I am getting lots of Content blocker errors on Safari. Because of loading external content in an iframe. Any workaround about this?

QuoteContent blocker prevented frame displaying https://myforum.com/forum/index.php?topic=6313.msg1805094;boardseen#new from loading a resource from https://syndication.twitter.com/i/jot/embeds?
Title: Re: Auto Tweet Embed
Post by: 20abc22 on December 29, 2022, 10:16:36 PM
I have installed this mod successfully, according to the messages I received. But the tweets basically look like links.

Yes, my version (2.1.3) is not officially supported, but can there be something I can check out that could be fixed to get this to work.

Thank you.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on December 29, 2022, 10:51:16 PM
I would check your javascript error log in your browser to see if any errors that might be related on a page with twitter links
Title: Re: Auto Tweet Embed
Post by: dmsolovyev on January 03, 2023, 09:11:09 AM
Hello there! The mod works absolutely fine for me, so I have an opposite problem  :D
Is it possible to disable embedding for the specific link (or post)?

What I want is the standard forum behavior for handling url, i.e. I'd like to be able to use the url bb code for twitter links, like this:
[url=https://twitter.com/bbcworld/status/1610105681285111808]text[/url]
Any ideas guys?  :)
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on January 03, 2023, 10:28:16 AM
Not possible currently.
Title: Re: Auto Tweet Embed
Post by: zorer on March 16, 2023, 07:43:19 PM
Hi! i tried this mod a in a fresh installation of SMF 2.1.3, posted a twitter link and nothing happen, i checked the permissions of the file tweet-cache.php and changed from 666 to 777, but nothing happend too, no error logs too.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on March 16, 2023, 10:16:36 PM
I would have to check if this still works. Twitter might have changed some stuff...
Title: Re: Auto Tweet Embed
Post by: zorer on March 17, 2023, 08:42:10 PM
Well i tried in a smf 2.1.3 installed in localhost and the autoembed works fine, looks i have some issues with my hosting about this mod
Any idea what i'm missing / is wrong in the hosting?
Thanks!
Title: Re: Auto Tweet Embed
Post by: zorer on March 19, 2023, 07:18:22 AM
Well, i have asked to my hosting service and they have answered me that this mod is not compatible with my environment, but that this other mod works https://custom.simplemachines.org/index.php?mod=3837 , to use that one.
Title: Re: Auto Tweet Embed
Post by: GantryZ on April 02, 2023, 08:59:11 AM
Recently installed 3.0 of this mod, initially installed on SMF 2.0.19 and upgraded to 2.1.3 but same issue - tweets with ? in the URL don't load, they give a "Tweet error (does not exist)" directly above the URL.  If I modify the post and remove the ? and everything after it - loads no problem.   I know 3.0 is supposed to fix so I likely missed a step in the install/config. 

Anything I should check?  Tried 777/775/755 on tweet-cache.php, SELinux is not running. 
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on April 02, 2023, 11:43:04 AM
It's a known bug i guess last fix didn't work for now remove after the ?
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 21, 2023, 06:16:31 PM
Hi @vbgamer45,

We noticed that lots of most recent tweets do not embed any longer. Meanwhile, older tweets do still get displayed, though. Can anyone replicate this?

Here are two examples:

This works:
https://twitter.com/ChemBros/status/616702940934377472

That doesn't:
https://twitter.com/ChemBros/status/1671587253066297344
Title: Re: Auto Tweet Embed
Post by: Gryzor on June 22, 2023, 02:55:39 AM
Quote from: Julius_2000 on June 21, 2023, 06:16:31 PMHi @vbgamer45,

We noticed that lots of most recent tweets do not embed any longer. Meanwhile, older tweets do still get displayed, though. Can anyone replicate this?

Here are two examples:

This works:
https://twitter.com/ChemBros/status/616702940934377472

That doesn't:
https://twitter.com/ChemBros/status/1671587253066297344
For me it does work on my forum...

https://www.cpcwiki.eu/forum/cpcwiki-discussion/test-20533/new/#new
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 22, 2023, 06:10:37 AM
Hm. Weird. I don't know how to tackle this. Old, already posted Tweets get displayed, new ones just won't get fetched.
I tried uninstalling and re-installing, checked the php files that would be changed by the mod for redundant code, and I tested it on a test forum with only these mods installed: Spoiler, Optimus, ThemeToggle and the latest 2.1.4 update.
Title: Re: Auto Tweet Embed
Post by: Gryzor on June 22, 2023, 06:12:40 AM
Can you post link? 
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 22, 2023, 06:23:21 AM
Hi,
This is a topic which contains lots of Tweet embeds. I made a comparison post of an old Tweet from its first page and the non-working one I mentioned above:
https://forum.thechembase.com/index.php?msg=32791
Title: Re: Auto Tweet Embed
Post by: Gryzor on June 22, 2023, 06:56:48 AM
Can you try putting it into a separate post?
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 22, 2023, 07:10:57 AM
I split my post

https://forum.thechembase.com/index.php/topic,3283.0.html

Another strange thing: I just uninstalled and deleted the mod and uploaded a "fresh" version (it's the same version actually). But now, none of the tweets get fetched at all. Checked load.php and Modifications.english.php, all contain the required code. Tweet-cache.php is also in the root directory.

Doesn't even work on a vanilla Default theme..

Man, this gives me headaches..

Edit:
My error log on the ftp server shows this message multiple times:
Quote[Thu Jun 22 11:07:54.903700 2023]
[proxy_fcgi:error] [pid redacted:tid #]
[remote redacted] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/home/myforum/data2/tweet-cache.php:82\nStack trace:\n#0 /usr/home/myforum/data2/tweet-cache.php(46): add_cache()\n#1 /usr/home/myforum/data2/tweet-cache.php(21): check_cache()\n#2 {main}\n  thrown in /usr/home/myforum/data2/tweet-cache.php on line 82', referer: https://test.myForum.com/index.php/topic,3007.msg28826.html
Title: Re: Auto Tweet Embed
Post by: Gryzor on June 22, 2023, 07:33:26 AM
Actually I meant putting the problematic tweet into its own post.

On the link you provided, fwiw I still see the first tweet perfectly. 
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 22, 2023, 07:34:34 AM
I deleted the working one.
Title: Re: Auto Tweet Embed
Post by: Gryzor on June 22, 2023, 07:40:34 AM
Ah yeah it fails by itself too, damn. I asked for it because some versions back only the first tweet in a post would embed for us... 
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 22, 2023, 07:43:45 AM
Are you able to check the server error log to see if there's a similar error like the one above noted?
Title: Re: Auto Tweet Embed
Post by: Gryzor on June 22, 2023, 08:01:53 AM
Unfortunately not for a few days but since for me it embeds fine I doubt I'll find anything...
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 22, 2023, 02:32:46 PM
Do you happen to know what php version you use? We've got 8.2.3 running at the moment.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 22, 2023, 06:41:45 PM
Posted an update that might help

4.0
!Updated the api call for twitter. Also better handling if no content returned.
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 22, 2023, 07:01:21 PM
Thank you, that's much appreciated. Before I un- & re-installed v3.0, some older tweets were still working. Now, no tweet gets fetched at all (I believe I checked the "deleted all associated files" ).

Unfortunately, v4.0 is also not working on our test forum. Well, not quite, at least I now get a "Tweet error (does not exist").



Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 22, 2023, 07:38:21 PM
Do you have curl installed?
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 23, 2023, 04:04:33 AM
As far as I can see in the mods, no. And I believe we never had.

Edit:
I see the following in the PHP info tab in admin:
cURL support    enabled
cURL Information    7.87.0
....
(there's more info in that segment)


We get a lot of notes like this in the error log for tweets:

Quote[Thu Jun 22 11:07:54.903700 2023]
[proxy_fcgi:error] [pid redacted:tid #]
[remote redacted] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/home/myforum/data2/tweet-cache.php:82\nStack trace:\n#0 /usr/home/myforum/data2/tweet-cache.php(46): add_cache()\n#1 /usr/home/myforum/data2/tweet-cache.php(21): check_cache()\n#2 {main}\n  thrown in /usr/home/myforum/data2/tweet-cache.php on line 82', referer: https://test.myforum.com/index.php/topic,3007.msg28826.html
Can you make sense of what's in there? Like "Cannot access offset of type string..."

Could it be that the tweets that are still working on our public forum are just cached and that's why we are still seeing them? The test forum won't display anything any longer after the un-/reinstallation except for the error message.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 23, 2023, 09:17:39 AM
That error was fixed in the last update. Only returned if json from the twitter api could not be called.


Yes, it could be from cached tweets.
Your webhost could be blocking an external fetch?
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 24, 2023, 03:45:23 AM
Quote from: vbgamer45 on June 23, 2023, 09:17:39 AMYour webhost could be blocking an external fetch?
I'll have to ask the owner. Could I point him to anything specific setting-wise? Can I look that up myself in the php info tab in "admin" perhaps?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 24, 2023, 10:11:46 AM
Try to do a curl https://publish.twitter.com/oembed?url=https://twitter.com/chesscom/status/1672371454053085185
From the server
and see what it returns from the command line.
Title: Re: Auto Tweet Embed
Post by: Planet_Dust on June 25, 2023, 10:56:17 AM
Quote from: vbgamer45 on June 23, 2023, 09:17:39 AMYour webhost could be blocking an external fetch?
No, I'm not blocking anything. But the higher-level provider also blocks, so:

Quote from: vbgamer45 on June 24, 2023, 10:11:46 AMTry to do a curl https://publish.twitter.com/oembed?url=https://twitter.com/chesscom/status/1672371454053085185
From the server
and see what it returns from the command line.

It will return nothing, Twitter is blocked in Russia.

P.S. But it's blocked more than a year, so something changed last month in Twitter API or code of the mod.
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 26, 2023, 05:07:32 AM
Quote from: vbgamer45 on June 24, 2023, 10:11:46 AMTry to do a curl https://publish.twitter.com/oembed?url=https://twitter.com/chesscom/status/1672371454053085185
From the server
and see what it returns from the command line.


What Planet-Dust wrote: He can't use the link as Twitter is blocked in Russia. But we were able to get Tweets embedded up until like a month ago or so, perhaps after we updated to 2.1.4 and related software (php etc.).
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 26, 2023, 08:54:18 AM
If your host is in a country that blocks twitter then the mod would not work.
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on June 26, 2023, 01:09:13 PM
So we were lucky then when it worked all this time I guess.. Too bad.
Title: Re: Auto Tweet Embed
Post by: HendriXXX on June 28, 2023, 01:38:12 PM
What changes this mod makes and which files? Does it modify database?

I want to test this, but I don't wanna mess my forum, so I probably have to make proper backups first..
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 28, 2023, 04:48:57 PM
Yes database changes new table you can check the mod site for the files it changes.
Title: Re: Auto Tweet Embed
Post by: HendriXXX on June 29, 2023, 01:34:32 AM
Ok. Thanks. I will check.

I have never installed mods to my forum.

Does smf have automated uninstall for mods which reverts all changed/added lines in files and database?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 29, 2023, 01:56:04 AM
File modifications yes as long as mod is coded right. And it depends if you install mods after the mod. Normally you should uninstall the mods installed after first. If it does file modifications.

Database if using SMF's database functions calls. There is an option to uninstall data. Not all mods support this.
Title: Re: Auto Tweet Embed
Post by: HendriXXX on June 30, 2023, 02:19:59 PM
I can't get it working. Mod install went through without problems, no errors. I checked files and those are okay. Apache error logs are clean.. but when I post twitter link, it just show the twitter link in post.  :-\

What I am doing wrong?  :-[

I don't know is this related, but has Twitter made some changes viewing content without logged in, because I can't see anything anymore?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 30, 2023, 02:30:56 PM
Check your javascript error console, console log.
Title: Re: Auto Tweet Embed
Post by: HendriXXX on June 30, 2023, 02:34:17 PM
Quote from: vbgamer45 on June 30, 2023, 02:30:56 PMCheck your javascript error console, console log.
How I can check that? I have firefox..
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 30, 2023, 02:38:59 PM
Bing it/Google it is probably either site or javascript issue.
Title: Re: Auto Tweet Embed
Post by: HendriXXX on June 30, 2023, 02:43:20 PM
I found it, no errors..  :-\
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on June 30, 2023, 03:12:47 PM
then it is probably a host/server issue. not supporting fetching via curl or fsockopen to download remote
Title: Re: Auto Tweet Embed
Post by: HendriXXX on July 01, 2023, 02:18:17 AM
It is redirecting every request to login page.. So i believe that your code is working fine, but Musk-******head has blocked everybody if not logged in and cant get tweet. Maybe it is temporary block..

curl https://twitter.com/i/web/status/1674677315073351681
Found. Redirecting to /i/flow/login?redirect_after_login=%2Fi%2Fweb%2Fstatus%2F1674677315073351681

Wonder why xenforo tweet embeds are still working in another forum..
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on July 01, 2023, 02:20:08 AM
yeah....i think might be due to musk since you can't view tweets now without login.
Title: Re: Auto Tweet Embed
Post by: Diego Andrés on July 01, 2023, 02:23:34 AM
Quote from: vbgamer45 on July 01, 2023, 02:20:08 AMyeah....i think might be due to musk since you can't view tweets now without login.

Every month changes now...
From being able to read/view a tweet, to being able to browse the entire site without login. And now back to complete restriction, a bit ridiculous.
Title: Re: Auto Tweet Embed
Post by: HendriXXX on July 01, 2023, 02:29:35 AM
Any ideas why xenforo embeds are still working?
Is there some paid API which they use? I noticed that some tweets are blocked in xenforo too, but not everything..
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on July 01, 2023, 02:34:14 AM
no idea would have to see the code.
They could be caching old tweets. Or hitting an endpoint/location that doesn't require logins yet.
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on July 01, 2023, 09:34:23 AM
I'm still able to embed new tweets by using google search and then copying the status link that is provided in the dotted context menu of the google search result card.

You cannot view this attachment.
You cannot view this attachment.

This is of course a cumbersome way, especially when it comes to finding most recent content but at least it works so far.


By the way, we were able to "solve" our tweet cache issue (https://www.simplemachines.org/community/index.php?msg=4154992) by using a proxy inside the tweet-cache.php file.
It produces some error every once in a while, but it doesn't seem that critical.
Title: Re: Auto Tweet Embed
Post by: mightygiants on August 19, 2023, 09:08:31 AM
Is there going to an update to address the domain change from twitter.com to x.com?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 19, 2023, 10:28:45 AM
Possibly to support both domains
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on August 20, 2023, 02:40:17 PM
Update

4.0.1
+Support x.com links
Title: Re: Auto Tweet Embed
Post by: mightygiants on August 21, 2023, 10:38:03 AM
Quote from: vbgamer45 on August 20, 2023, 02:40:17 PMUpdate

4.0.1
+Support x.com links

I upgraded from 3 to this new one (started prior to the "?" fix).   The tweets with "?" (which is now all tweets) still don't register (there is no error message, but the link remains untouched).  Is there something I need to do to allow the improved version to convert the links with the "?"?   I didn't remove the table entry for any of the upgrades.  Would that have caused an issue?
Title: Re: Auto Tweet Embed
Post by: GantryZ on September 01, 2023, 04:55:21 PM
Anyone else seeing double tweets?  Everyone time someone on my forum posts now the tweet shows up twice.  I tried removing and re-installing to no avail.

I'm also seeing the following under admin -> Error Log when people embed tweets.  The log info doesn't show up every time and as far as I can tell it doesn't affect anything visually.  Edit - I went into the thread showing these errors and a bunch came up under my name.  So these errors aren't showing up based on who made the tweet, but logged in users who are trying to read the page of the thread with the tweet. 
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 01, 2023, 05:34:05 PM
Posted an update hopefully helps with the query string tweets

If you are seeing double embeds I would check that the code is not added twice to Sources/Load.php
Title: Re: Auto Tweet Embed
Post by: GantryZ on September 01, 2023, 06:06:28 PM
Just removed the previous version and installed 4.0.2 - so far not seeing the query string logs.  As a bonus, it looks like the double embeds got fixed as well.  Will report back if anything changes, thanks a ton!
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on September 02, 2023, 05:29:11 PM
I regularly had these bugs when I uninstalled and re-installed older AutoTweet mods. For some reason it wasn't correctly removing its entries in the source php files which caused redundancies (double entries) after re-installation.
Title: Re: Auto Tweet Embed
Post by: GantryZ on September 02, 2023, 06:11:00 PM
That very well could have been the issue with mine as I did uninstall and reinstall a couple times.  I also didn't check off "Remove all data associated with this modification" until the last time when it worked. 
Title: Re: Auto Tweet Embed
Post by: mightygiants on September 03, 2023, 01:53:55 PM
Quote from: vbgamer45 on September 01, 2023, 05:34:05 PMPosted an update hopefully helps with the query string tweets

If you are seeing double embeds I would check that the code is not added twice to Sources/Load.php

Removing all data seems to have fixed the "?" issue that I had, but Tweets from the "x.com" domain are still coming back with Tweet error (does not exist)
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 03, 2023, 04:46:09 PM
Can you provide an example?
Title: Re: Auto Tweet Embed
Post by: mightygiants on September 03, 2023, 05:31:46 PM
Quote from: vbgamer45 on September 03, 2023, 04:46:09 PMCan you provide an example?


This tweet

https://x.com/nfl_dovkleiman/status/1698093742865908221?s=46&t=1vcQIN8GqF5J2oLdxEVEJQ

produces this result


Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 03, 2023, 05:54:50 PM
Copy this file to your root directory of your forum and see if it helps
Title: Re: Auto Tweet Embed
Post by: GantryZ on September 03, 2023, 06:28:58 PM
I had the same error as @mightygiants (posted the same URL) and putting in that new tweet-cache.php fixed it for me. 
Title: Re: Auto Tweet Embed
Post by: GantryZ on September 03, 2023, 06:30:34 PM
That said I have a similar error attached with the URL below.  If I click on the URL I can load the page in Twitter fine.  If I remove everything after the ? it just shows the URL with nothing embedded, but no error.  Clicking on the link does work though in that case. 
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 03, 2023, 06:33:52 PM
4.0.3
!Handle x.com better, api workaround.
Title: Re: Auto Tweet Embed
Post by: mightygiants on September 03, 2023, 07:10:29 PM
Quote from: vbgamer45 on September 03, 2023, 06:33:52 PM4.0.3
!Handle x.com better, api workaround.

Thank you, that fixed it!
Title: Re: Auto Tweet Embed
Post by: GantryZ on September 03, 2023, 07:32:57 PM
Quote from: GantryZ on September 03, 2023, 06:30:34 PMThat said I have a similar error attached with the URL below.  If I click on the URL I can load the page in Twitter fine.  If I remove everything after the ? it just shows the URL with nothing embedded, but no error.  Clicking on the link does work though in that case. 

4.0.3 fixed this issue for me as well, thanks again!
Title: Re: Auto Tweet Embed
Post by: Julius_2000 on September 06, 2023, 09:15:45 AM
@vbgamer45 , the changelog in the 4.0.3 package only mentions changes up to 4.0.1. Is that supposed to be? Would it be also possible to add a version suffix to the download package? Thanks for all your effort!
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on September 06, 2023, 10:34:01 AM
4.0.3
!Handle x.com better, api workaround.
4.0.2
!Query string handling improvements
Title: Re: Auto Tweet Embed
Post by: jsx on October 23, 2023, 03:52:07 PM
vbgamer45 can you implement Polish language into autotwitter.xml? I know it's not much, but it would be nice to have it translated.

<file name="$languagedir/Modifications.polish.php">
    <operation>
        <search position="end" />
        <add><![CDATA[
// Begin Auto Embed Twitter Strings
$txt['autotwitter_tweeterror'] = 'Błąd tweeta (nie istnieje)';
$txt['autotwitter_blankid'] = 'Błąd tweeta (pusty identyfikator)';
// END Auto Embed Twitter Strings           
]]></add>
    </operation>
</file>

<file name="$languagedir/Modifications.polish-utf8.php" error="skip">
    <operation>
        <search position="end" />
        <add><![CDATA[
// Begin Auto Embed Twitter Strings
$txt['autotwitter_tweeterror'] = 'Błąd tweeta (nie istnieje)';
$txt['autotwitter_blankid'] = 'Błąd tweeta (pusty identyfikator)';
// END Auto Embed Twitter Strings           
]]></add>
    </operation>
</file>
Title: Re: Auto Tweet Embed
Post by: Marina3 on November 04, 2023, 08:55:44 AM
And where are the settings for this mod?
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on November 04, 2023, 09:47:15 AM
There are no settings. You just put a twitter link and it should auto embed
Title: Re: Auto Tweet Embed
Post by: Antechinus on November 04, 2023, 05:07:34 PM
Just a thought: how hard would it be to also allow embedding on nitter.net media? With the extent to which Twitter/X has been degraded by Musk these days, Nitter is (IMO) a far better way of following content there. It's lighter on resources. You can follow a complete thread without logging in. You can see the account's recent timeline, in full, Etc, etc. Frankly, Nitter leaves Twitter/X for dead.
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on November 04, 2023, 10:36:15 PM
Possibly have to see some example links might not be added to this mode but S.A.V.E instead
Title: Re: Auto Tweet Embed
Post by: Antechinus on November 04, 2023, 10:42:44 PM
Links are simple. It's just a TLD change. The rest of the link stays the same.

https://nitter.net/gunsnrosesgirl3/status/1717182106382528702
https://twitter.com/gunsnrosesgirl3/status/1717182106382528702

https://nitter.net/gunsnrosesgirl3/status/1717182106382528702
https://twitter.com/gunsnrosesgirl3/status/1717182106382528702
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on November 05, 2023, 08:49:49 PM
Does nitter having share coding though? I could change nitter to twitter to auto embed.
Title: Re: Auto Tweet Embed
Post by: Antechinus on November 05, 2023, 09:01:58 PM
No idea. I don't use an account with either. I just view as a guest.
Changing nitter to twitter would be rather defeating the purpose of the exercise.
Title: Re: Auto Tweet Embed
Post by: CreativeITWorld.com on January 08, 2024, 06:08:36 PM
I looked for a way to center tweets and couldn't find one within the topic, but managed to find the answer elsewhere ...

In Index.css Add
.twitter-tweet {
margin: 0 auto;
text-align: center;
}

You still have to use the standard center bbc if you want to center the text/link.
Title: Re: Auto Tweet Embed
Post by: steferrari on February 08, 2024, 11:58:11 AM
Hi, I installed this mod and it seems to work ok on my forum, the only "issue" is that I see the tweet link under every tweet that I post.

Is this normal? Any chance to get rid of it?

Thank you!
Title: Re: Auto Tweet Embed
Post by: vbgamer45 on February 08, 2024, 02:06:40 PM
I believe that is normal. I am not sure on removing it.
Title: Re: Auto Tweet Embed
Post by: steferrari on February 08, 2024, 02:43:13 PM
I asked that because I previously used this (https://custom.simplemachines.org/index.php?mod=3837) mod to embed tweets and they are displayed alone, without showing the link (more clean imho) but at the same time that mod has an issue with smileys: when you post a tweet, smileys are not displayed anymore.