cancel
Showing results for 
Search instead for 
Did you mean: 
aysenur_ozyer
Community Member

Twitter widget doesn't show some of the tweets

Jump to solution

Hi,

I embedded a Twitter widget into a Canvas page using the app here: http://www.edu-apps.org/tools/twitter/index.html

It seems to be working however, it excludes some tweets without any specific reason. I couldn't figure out why it's doing that and how to fix it. Here's the HTML code I used:

<iframe src="http://www.edu-apps.org/tools/twitter/twitter_embed.html?widget_id=603290269295841280&url=https%3A%2..." frameborder="0" style="width: 500px; height: 300px;"></iframe>

The widget's code was:

<a class="twitter-timeline" href="https://twitter.com/hashtag/ucdclde" data-widget-id="603290269295841280">#ucdclde 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>

It uses the #ucdclde hashtag.

Thanks in advance!

Tags (3)
1 Solution

Accepted Solutions
jamely
Community Champion

I found an even better explanation. I realized that if my tweets have a URL connected, they were not showing up in the hashtag search. Turns out that since I am a new Twitter account, the indexing engine will skip my tweets that have URL's in them, the idea is that it is blocking excess spam. Obviously this makes it pretty useless to use within an education setting where we are trying to share article and video links!

A work around that was found was to add a small picture. I have personally tested this and found that it worked on my two previously un-indexed (meaning un-searchable) tweets that contained shortened URL's. The bad side is that this uses up 20 or so characters, meaning the text around the link needs to be even shorter.

Hope this helpful to others, it kept me up late trying to find out why my twitter feed that was embedded on the course homepage wasn't finding my new tweets!

This link will direct you to the thread that I found this answer in.

View solution in original post

7 Replies
cms_hickss
Community Contributor

Was the changing of the colon and slashes in the URL just when you copied and pasted it here?

You have:

https%3A%2F%2Ftwitter.com%2Fhashtag%2Fucdclde"

and it should be:

https://twitter.com/hashtag/ucdclde

mpoole
Community Participant

I used the LTI and external tool button on the dashboard within Canvas and when I compare it with a search for that hashtag on twitter, it seems to be showing all of the tweets (you may have to change the max # in the code).  This is how the embed code looks using the tool:

<p><iframe style="width: 500px; height: 530px;" title="Twitter: #ucdclde" src="https://www.edu-apps.org/twitter_lti/?hashtag=ucdclde&embedded=1&max=10" width="300" height="150" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen"></iframe></p>

I'm not sure how to tell what's different about the way you've got it but it seems to work.  Maybe test this code and see if it shows the ones you were missing?  Here's how I added it:

twitter.jpg

Deactivated user​

I too add the twitter feed as  @mpoole ​ does.  If your Canvas Admin does not have the twitter app activated the rich content editor for you you may be able to add it to your class following these steps.

  • click settings in the bottom left of your course
  • click the apps tab in the center pain
  • search for twitter and click on the twitter tile
  • click add app
  • The name should default to twitter and click add again.

I should then appear in your RCE

Your Canvas Admin does have granular control of these tools, so if you are unable to add this App you will want to talk with them.

dlyons
Instructure
Instructure

If you're using the twitter LTI for the edu app center to embed search results into Canvas you're seeing public search results. What that means is when you (a logged in user) search on twitter you will see results from any users with protected accounts if they've given you access; those tweets would not show up in public search results though.

Is it possible you have some students/colleagues with protected twitter accounts that you have access to and that is why you're not seeing their tweets in the public search results that show in the LTI?

clong
Community Champion

Hi Aysenur.

Most likely you are seeing what  @dlyons ​ explained above and Twitter makes does make the following disclaimer:

"Please note that Twitter’s search service and, by extension, the Search API is not meant to be an exhaustive source of Tweets. Not all Tweets will be indexed or made available via the search interface."

GET search/tweets | Twitter Developers

jamely
Community Champion

I found an even better explanation. I realized that if my tweets have a URL connected, they were not showing up in the hashtag search. Turns out that since I am a new Twitter account, the indexing engine will skip my tweets that have URL's in them, the idea is that it is blocking excess spam. Obviously this makes it pretty useless to use within an education setting where we are trying to share article and video links!

A work around that was found was to add a small picture. I have personally tested this and found that it worked on my two previously un-indexed (meaning un-searchable) tweets that contained shortened URL's. The bad side is that this uses up 20 or so characters, meaning the text around the link needs to be even shorter.

Hope this helpful to others, it kept me up late trying to find out why my twitter feed that was embedded on the course homepage wasn't finding my new tweets!

This link will direct you to the thread that I found this answer in.

View solution in original post

harlacla
Community Member

This may be a dead thread, but...although the above does work, I've found that if you skip using the Twitter app within Canvas (the LTI thing) and instead make your own widget in Twitter, you can embed a hashtag feed that seems to avoid the "new account, therefore links must be spam!" filter. (Side note, that really annoyed me because I've been on Twitter since 2012 - not my definition of a new account - but I don't tweet much; no clue what the magic number of tweets might be!)

In order to get it to show up, there's a little bit of HTML magic that needs to be done, but I found that the step by step instructions at the following site work perfectly:

Twitter4Canvas 

As a bonus, the widget looks better than the LTI, at least IMHO, and images are displayed!