XWidgetSoft Forum
https://www.bbs.xwidget.com/

HTML + Twitter Widget
https://www.bbs.xwidget.com/viewtopic.php?f=8&t=5503
Page 1 of 1

Author:  kabott1 [ February 20th, 2015, 12:48 pm ]
Post subject:  HTML + Twitter Widget

Hey guys, i been trying to get this Widget to work for weeks without success

So, i created a Twitter Widget from my Twitter account

Attachment:
twitterwidget1.png
twitterwidget1.png [ 62.81 KiB | Viewed 8715 times ]


then i created an Xwidget with an HTML panel and used the following code:

Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body style="margin:0;padding:0">

            <a class="twitter-timeline" data-dnt="true" href="https://twitter.com/hashtag/NewsFlash" data-widget-id="568866171081207808">#NewsFlash Tweets</a>
            <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
         
         
</body>
</html>


But no luck, i get this

Attachment:
panel2.png
panel2.png [ 2.64 KiB | Viewed 8715 times ]


I tried the same code in this HTML test page: http://codebeautify.org/htmlviewer/
same result, just a link, no widget

here's the Xwidget Widget , Having a Twitter Widget on the desktop would be great, hope someone can help fix it!

Attachment:
AIVI_Twitter.xwp [18.09 KiB]
Downloaded 307 times

Author:  digigamer [ March 14th, 2015, 12:45 am ]
Post subject:  Re: HTML + Twitter Widget

The widget configuration is not found. Try generating a new search widget.

Meanwhile I have managed a twitter widget here
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body style="margin:0;padding:0">

<!--            <a class="twitter-timeline" data-dnt="true" href="https://twitter.com/hashtag/NewsFlash" data-widget-id="568866171081207808">#NewsFlash Tweets</a>
          <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
-->         
          <a class="twitter-timeline"  href="https://twitter.com/OriginalASM" data-widget-id="576663507124379649">Tweets by @OriginalASM</a>
            <script>
            function(d,s,id){
               var js,fjs=d.getElementsByTagName(s)[0];
               if(!d.getElementById(id)) {
                  js=d.createElement(s);
                  js.id=id;
                  js.src="https://platform.twitter.com/widgets.js"; //edit this line to include https
                  fjs.parentNode.insertBefore(js,fjs);
               }
            }(document,"script","twitter-wjs");
         </script>
         
         
</body>
</html>


It's my profile!

Author:  kabott1 [ March 14th, 2015, 6:56 am ]
Post subject:  Re: HTML + Twitter Widget

Hey digigamer! thanks for the answer! although im still getting a link instead of the widget: "Tweets by @OriginalASM" in this case, as i wanted to test if it worked for you.
perhaps im doing something wrong, dunno, the thing is Ive never got the html panel to display a twitter widget, not even a website's twitter widgets already working. it will display everything except the widget, in its place ill get a link. Some browser add-ons will prevent sites from creating cookies, like Ghostery or Add Block, they see twitter widget as advertising so they block it too, i used to have this problem till i disable them. So i believe xwidget html panel wont show twitter widget cause it doesn't allows cookies.

anyways, let me know if im wrong and you got it to work. thanks man.

Author:  digigamer [ March 25th, 2015, 3:36 am ]
Post subject:  Re: HTML + Twitter Widget

IE 7 Sucks. Winndows is somewhat stuck with IE 7. It won't allow XHR form files loaded from the disk

Got a website?
You can host an html webpage and point it to it.

Here's a free stater:
www.orgfree.com

Author:  kabott1 [ March 25th, 2015, 7:37 am ]
Post subject:  Re: HTML + Twitter Widget

digigamer wrote:
IE 7 Sucks. Winndows is somewhat stuck with IE 7. It won't allow XHR form files loaded from the disk

Got a website?
You can host an html webpage and point it to it.

Here's a free stater:
http://www.orgfree.com



I've tried already, i created a website and hosted it in my google drive:
https://acecd96699e86178e067e93e0a09a29 ... BrSFpoV0U/

pointed to the link in xwidget html panel.. i tested the site on IE7, an works perfectly, however xwidget version shows half the stuff there.

i read a bunch of things about twitter widgets, i remember i read something about needing to create cookies and that's why some add blockers block it, so.. as i understand, xwidget doesn't allows cookies.. :/

Author:  digigamer [ March 29th, 2015, 9:53 pm ]
Post subject:  Re: HTML + Twitter Widget

Cookies are allowed in IE embedded instances. They are not persistent however.
Xwidget doesn't include scrollbars, that might be the issue. Post a version (and the html) I'll see what can be done

Author:  kabott1 [ March 30th, 2015, 4:35 pm ]
Post subject:  Re: HTML + Twitter Widget

hi digigamer, run this code here: http://www.w3schools.com/tags/tryit.asp ... tml_script


Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body style="margin:0;padding:0">
<body>

            <div id="twitterCol1">

       
                  <a class="twitter-timeline"  href="https://twitter.com/LukeFXG/lists/analysts" data-widget-id="558399712316121090">Tweets from https://twitter.com/LukeFXG/lists/analysts</a>
                  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
               
           

            </div><!--twitterCol1-->

</body>
</html>


it works, but this html code shows only a link in the widget attached.
any help is appreciated, thanks mate.

Attachments:
AIVI_Twitter_V2.xwp [36.24 KiB]
Downloaded 282 times

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/